Digital filter generation method, device and digital signal processing system
By obtaining the zero and pole sets of the high-order digital filter and configuring the transmission characteristics of the second-order IIR digital filter, the distance between the zero and pole of the second-order filter is minimized, which solves the instability problem of the cascade filter and achieves the stability of the N-order IIR digital filter.
Patent Information
- Application Number
- CN202011131678.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-10-21
- Publication Date
- 2025-09-12
- Estimated Expiration
- 2040-10-21
AI Technical Summary
When converting a high-order IIR digital filter into a cascaded second-order IIR digital filter, the prior art may ignore the stability of the filter, resulting in instability of the cascaded filter.
By obtaining the zero and pole sets of the transfer characteristics of the high-order digital filter, the transfer characteristics of the second-order IIR digital filter are configured so that the distance between the zero and pole of the second-order filter is minimized, thereby ensuring the stability of the cascade filter.
The stability of the cascade filter is improved and the stability of the N-order IIR digital filter is ensured.
Smart Images

Figure CN114389575B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of digital signal processing, and in particular to a method and device for generating a digital filter and a digital signal processing system. Background Art
[0002] In many digital signal processing systems, to save computational overhead, hardware is used to implement some second-order IIR digital filters (Biquads). This converts high-order IIR digital filters into multiple cascaded second-order IIR digital filters. Specifically, filter coefficients can be assigned to multiple second-order IIR digital filters at the top level and called upon, allowing the cascaded second-order IIR digital filters to flexibly implement high-order digital filters of varying orders.
[0003] The existing conversion method directly uses the undetermined coefficient method: the coefficients of the second-order digital filter are set as unknown numbers. After cascading, they are required to be equal to the coefficients of the original high-order digital filter. This can generate the corresponding equation. By solving the equation, the coefficients of the second-order digital filter can be solved.
[0004] This method may not consider the stability of the filter when selecting coefficients. Therefore, the resulting second-order filters may be unstable, which in turn affects the stability of the Nth-order IIR digital filter obtained by cascading second-order filters. Summary of the Invention
[0005] In view of this, the present invention provides a method and device for generating a digital filter and a digital signal processing system to solve the above problems.
[0006] In order to achieve the above-mentioned object of the invention, the present invention provides the following technical solutions:
[0007] A digital filter generation method is used to generate an N-order IIR digital filter; N is a positive integer greater than 2;
[0008] The method comprises:
[0009] Obtaining a zero point set and a pole set corresponding to the transmission characteristics of the N-order IIR digital filter; wherein the zero point set includes n zero points, and the pole set includes m poles; n and m are positive integers;
[0010] Configuring the transmission characteristics of a second-order IIR digital filter based on the zero set and the pole set to obtain a plurality of configured second-order IIR digital filters; the transmission characteristics are jointly determined by the zeros and the poles; wherein the poles corresponding to any configured second-order IIR digital filter belong to the pole set, and the zeros corresponding to any configured second-order IIR digital filter include: among the n zeros, the zero that is closest to the pole corresponding to any configured second-order IIR digital filter;
[0011] A plurality of configured second-order IIR digital filters are cascaded to obtain the N-order IIR digital filter.
[0012] Optionally, configuring the transmission characteristics of the second-order IIR digital filter based on the zero point set and the pole set to obtain multiple configured second-order IIR digital filters includes: sorting the m poles from small to large according to stability to obtain a sorted pole set; performing multiple rounds of filter coefficient allocation operations based on the zero point set and the sorted pole set until all the zero points in the zero point set and all the poles in the sorted pole set are configured to obtain multiple configured second-order IIR digital filters.
[0013] Optionally, the transmission characteristics of the configured second-order IIR digital filter are characterized by filter coefficients; the second-order IIR digital filter corresponding to any round of filter coefficient allocation operation is the target second-order IIR digital filter; the transfer function of the target second-order IIR digital filter is the target transfer function; any round of filter coefficient allocation operation includes: allocating poles to the target transfer function based on the sorted pole set; the allocated poles are the target poles; selecting the zero point closest to the target pole from the zero point set as the zero point of the target transfer function; the allocated zero point is the target zero point; expanding the transfer function after allocating the target pole and the target zero point into the form of polynomial multiplication; and determining the coefficients in the numerator and denominator of the polynomial as the filter coefficients of the target second-order IIR filter.
[0014] Optionally, the sorting by stability from small to large includes: if there are conjugate complex poles and real poles, placing the conjugate complex poles before all real poles; if there are multiple pairs of conjugate complex poles, calculating the first distance between each pair of conjugate complex poles and the unit circle 1; sorting the multiple pairs of conjugate complex poles from small to large according to the first distance; if there are multiple real poles, calculating the second distance between each real pole and the unit circle 1; and sorting the multiple real poles from small to large according to the second distance.
[0015] Optionally, assigning poles to the target transfer function based on the sorted pole set includes: if there are conjugate complex poles in the sorted pole set, selecting the first pair of conjugate complex poles from the sorted pole set in order as the roots of the denominator in the target transfer function: the selected conjugate complex poles are the target poles; and the target poles are removed from the sorted pole set; selecting the zero point closest to the target pole from the zero point set includes: if there are conjugate complex zero point pairs in the zero point set, selecting the conjugate complex zero point pair closest to the target pole as the root of the numerator in the target transfer function; or, if there are no conjugate zero points in the zero point set but there are at least two real zero points, selecting the two real zero points closest to the target conjugate complex pole as the roots of the numerator in the target transfer function; or, if there is only one real zero point in the zero point set, selecting the only remaining real zero point as the root of the numerator in the target transfer function, and multiplying the numerator by z -1 Or, if the zero point set is empty, let the numerator of the target transfer function be 1 and multiply by z -2 ; Eliminate the selected zero point from the zero point set.
[0016] Optionally, assigning poles to the target transfer function based on the sorted pole set includes: if there is no conjugate complex pole in the sorted pole set but there are at least two real poles, selecting two real poles from the sorted pole set in order as roots of the denominator in the target transfer function: the selected real pole is the target pole; the target pole is removed from the sorted pole set; selecting the zero point closest to the target pole from the zero point set includes: if there is a conjugate complex zero point pair in the zero point set, selecting the conjugate complex zero point pair closest to the target pole as the root of the numerator in the target transfer function; or, if there is no conjugate zero point in the zero point set but there are at least two real zero points, selecting the two real zero points closest to the target pole as the root of the numerator in the target transfer function; or, if there is only one real zero point in the zero point set, selecting the only remaining real zero point as the root of the numerator in the target transfer function, and multiplying the numerator by z -1 Or, if the zero point set is empty, let the numerator of the target transfer function be 1 and multiply by z -2 ; Eliminate the selected zero point from the zero point set.
[0017] Optionally, the assigning of poles to the target transfer function based on the sorted pole set includes: if there is no conjugate complex pole in the sorted pole set and there is only one real pole, selecting the real pole as the root of the denominator in the target transfer function; the selected real pole is the target pole; the target pole is removed from the sorted pole set; the selecting of the zero point closest to the target pole from the zero point set includes: if there is a conjugate complex zero point pair in the zero point set, selecting Take the conjugate complex zero point pair closest to the target pole as the root of the numerator in the target transfer function; or, if there is no conjugate zero point in the zero point set but there are at least two real zero points, take the two real zero points closest to the target pole as the root of the numerator in the target transfer function; or, if there is only one real zero point in the zero point set, select the only remaining real zero point as the root of the numerator in the target transfer function; or, if the zero point set is empty, the numerator is 1, and the numerator is multiplied by z -1 ; Eliminate the selected zero point from the zero point set.
[0018] Optionally, assigning poles to the target transfer function based on the sorted pole set includes: if the sorted pole set is empty but the zero point set is not empty, setting the denominator in the target transfer function to 1; selecting the zero point closest to the target pole from the zero point set includes: if there is a conjugate complex zero point pair in the zero point set, selecting a pair of conjugate complex zero point pairs as the roots of the numerator in the target transfer function; or, if there is no conjugate zero point in the zero point set but there are at least two real zero points, selecting two real zero points as the roots of the numerator in the target transfer function; or, if there is only one real zero point in the zero point set, selecting the only remaining real zero point as the root of the numerator in the target transfer function; and removing the selected zero point from the zero point set.
[0019] Optionally, before cascading multiple configured second-order IIR digital filters, it also includes: multiplying the transfer function of one of the second-order IIR digital filters by a fixed coefficient K; the ratio of the transfer function of the N-order digital filter to the multiplication result of the transfer functions of the multiple configured second-order digital filters is equal to the K.
[0020] A digital filter generating device, comprising:
[0021] Multiple second-order IIR digital filters;
[0022] Memory, used to store computer programs or instructions;
[0023] A processing unit is configured to call the computer program or instruction from a memory to execute any one of the methods described above.
[0024] A digital signal processing system, characterized in that it includes an N-order IIR digital filter composed of multiple second-order IIR digital filters according to the above method; N is a positive integer greater than 2; or includes the above-mentioned generating device.
[0025] As can be seen, in the embodiment of the present invention, the zero point set and pole set of the transfer characteristic of the high-order digital filter are first obtained, and then the transfer characteristic of the second-order IIR digital filter is configured based on the zero point set and the pole set. The zero point corresponding to the second-order filter is the zero point in the zero point set that is closest to the pole corresponding to its second-order filter. For a second-order IIR filter, the closer the zero point and pole are, the easier it is to offset the influence of the pole, making the second-order filter as stable as possible, thereby ensuring the stability of the N-order IIR digital filter obtained by cascading second-order filters. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] Figure 1a An exemplary structural diagram of a digital signal processing system provided by an embodiment of the present invention;
[0027] Figure 1b An exemplary relationship between a generating device and each second-order IIR digital filter provided in an embodiment of the present invention;
[0028] Figure 2a An exemplary process of the generation method provided in an embodiment of the present invention;
[0029] Figure 2b Another exemplary process of the generation method provided in an embodiment of the present invention;
[0030] Figure 3 An exemplary process for allocating poles and zeros provided in accordance with an embodiment of the present invention;
[0031] Figure 4 This is an exemplary structure of a generating device provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0032] Existing methods for converting high-order IIR digital filters into multiple cascaded second-order IIR digital filters directly use the undetermined coefficient method: the coefficients of the second-order digital filter are set as unknowns, and after cascading, they are required to be equal to the coefficients of the original high-order digital filter. This yields the corresponding equation. Solving this equation can then reveal the coefficients of the second-order digital filter.
[0033] Taking a fourth-order high-order digital filter as an example, the general expression of its transfer function in the Z domain is as follows:
[0034] In Formula 1, b0-b4 and a0-a4 are known coefficients, z represents the independent variable, and superscripts -1 to -4 represent the first to fourth orders (or the power).
[0035] The cascade of digital filters is to multiply the corresponding transfer functions. The fourth-order digital filter can be converted into the cascade form of two second-order digital filters:
[0036]
[0037] c0-c2, d0-d2, e0-e2, and f0-f2 in Formula 1 are all unknown coefficients.
[0038] Combining Formula 1 and Formula 2, since the coefficients are equal, it means that z in the numerator and denominator is -1 、z -2 、z -3 、z -4 is exactly equal to the constant term. That is:
[0039]
[0040] Equation 3 above involves 10 equations and 12 unknowns. Therefore, this equation theoretically has an infinite number of solutions. This method of selecting coefficients may not consider filter stability. Consequently, the resulting second-order filters may be unstable.
[0041] In view of this, embodiments of the present invention claim to protect a method for generating a digital filter, a generating device, and a digital signal processing system to solve the above problems.
[0042] See Figure 1a The above-mentioned digital signal processing system includes an N-order IIR digital filter composed of multiple cascaded second-order IIR digital filters.
[0043] In implementation, the generating device can allocate filter coefficients to multiple second-order IIR digital filters respectively and call them, and cascade the second-order IIR digital filters with allocated filter coefficients to flexibly realize high-order digital filters of different orders.
[0044] The second-order IIR digital filter may be a hardware circuit or module, or a functional module implemented by software. In this embodiment, a second-order IIR digital filter implemented by hardware is preferred.
[0045] See Figure 1b The generating device and each second-order IIR digital filter can be integrated into the same chip or the same board, or can be located in different chips or boards.
[0046] Figure 2aAn exemplary process of the generation method performed by the above generation device is shown, which may include at least the following steps:
[0047] S1: Obtain a set of zeros and a set of poles corresponding to the transfer characteristics of an N-order digital filter.
[0048] N is a positive integer greater than 2.
[0049] The transfer characteristics can be characterized by the transfer function.
[0050] There are many forms of transfer function formulas. Taking a sixth-order IIR digital filter as an example, assume that one of the transfer function formulas is as follows:
[0051]
[0052] The above transfer function can be rewritten as another formula form including the proportional coefficient K, the zero point set z (z(1), z(2), etc.) and the pole point set p (p(1), p(2), etc.):
[0053]
[0054] Among them, z(1), z(2), z(3), z(4), etc. in the numerator are zero points, and p(1), p(2), p(3), p(4), etc. in the denominator are poles.
[0055] From this we can see that the transfer characteristics (transfer function) can also be determined by the zero points and poles.
[0056] The zeros are the values of z obtained by setting the numerator of the transfer function (Equation 4) equal to zero. The poles are the values of z obtained by setting the denominator of the transfer function (Equation 4) equal to zero.
[0057] Taking Formula 1 as an example, its extreme point set p includes:
[0058]
[0059] Its zero point set z includes:
[0060]
[0061] Where j is the representation unit of the imaginary part. It can be seen that there are 6 poles and 5 zeros corresponding to Formula 4.
[0062] Specifically, the generating device may obtain coefficients corresponding to the transfer function input by the user to obtain the transfer function of the N-th order digital filter.
[0063] Furthermore, by setting the numerator of the transfer function of an N-order digital filter equal to zero, n values of z are obtained (i.e., n zeros), and these n zeros constitute a zero set. Similarly, by setting the denominator of the transfer function of an N-order digital filter equal to zero, m values of z are obtained (i.e., m poles), and these m poles constitute a pole set. n and m are positive integers and not greater than N.
[0064] The proportional coefficient K is a fixed constant, which is equal to the ratio of the transfer function of the N-th order digital filter to the multiplication result of the transfer functions of the plurality of configured second-order digital filters.
[0065] S2: Based on the zero set and the pole set, a transmission characteristic of the second-order IIR digital filter is configured to obtain a plurality of configured second-order IIR digital filters.
[0066] According to the above, the transfer characteristics (transfer function) of the digital filter can be determined by the zero points and the poles. Specifically, the coefficients of the second-order IIR digital filter can be determined based on the zero point set and the pole set, and then the transfer characteristics of the second-order IIR digital filter can be determined.
[0067] In this embodiment, the zero points of the poles corresponding to any configured second-order IIR digital filter meet the following conditions:
[0068] The poles belong to a pole set of the N-order IIR digital filter, and the zeros include: a zero of the N-order IIR digital filter that is closest to a pole corresponding to the configured second-order IIR digital filter among the n zeros of the N-order IIR digital filter.
[0069] In an example, see Figure 2b , we can first sort the m poles in ascending order of stability (this article will explain how to sort them later) to obtain a sorted pole set. Then, we perform multiple rounds of filter coefficient assignment based on the zero set and the sorted pole set until all zeros in the zero set and poles in the sorted pole set are assigned, resulting in multiple assigned second-order IIR digital filters.
[0070] Specifically, the second-order IIR digital filter corresponding to any round of filter coefficient allocation operations may be referred to as a target second-order IIR digital filter, and the transfer function corresponding to the target second-order IIR digital filter may be referred to as a target transfer function. In one example, any round of filter coefficient allocation operations may include:
[0071] Assigning poles to the target transfer function based on the sorted pole set (the assigned poles may be referred to as target poles);
[0072] The zero point closest to the target pole is selected from the zero point set as the zero point of the target transfer function.
[0073] After assigning zeros and poles to a second-order IIR filter, the transfer function of one of the second-order IIR digital filters can be multiplied by a fixed coefficient, K. Because K is a constant, multiplying it by the numerator coefficient of the transfer function of a second-order IIR digital filter eliminates the need for an additional register to store K.
[0074] After the transfer function of each configured second-order IIR filter is expanded into a form of multiplication of polynomials, the coefficients in the numerator and denominator of the polynomial are the filter coefficients of the corresponding second-order IIR filter.
[0075] S3: cascade multiple configured second-order IIR digital filters to obtain an N-order IIR digital filter.
[0076] Specifically, the order of calling the second-order IIR digital filter can be configured to achieve cascading, that is, the input source and the output source of the second-order IIR digital filter are set.
[0077] For example, for three configured second-order IIR digital filters A, B, and C, if the input of A is the output of B and the input of B is the output of C, then C, B, and A are cascaded together.
[0078] As can be seen, in the embodiment of the present invention, the zero point set and pole set of the transfer characteristic of the high-order digital filter are first obtained, and then the transfer characteristic of the second-order IIR digital filter is configured based on the zero point set and the pole set. The zero point corresponding to the second-order filter is the zero point in the zero point set that is closest to the pole corresponding to its second-order filter. For a second-order IIR filter, the closer the zero point and pole are, the easier it is to offset the influence of the pole, making the second-order filter as stable as possible, thereby ensuring the stability of the N-order IIR digital filter obtained by cascading second-order filters.
[0079] The following describes how to sort the m poles in ascending order of stability.
[0080] Using Equation 4 as an example, selecting any two of the six poles and combining them as coefficients yields the denominator of a second-order IIR digital filter. Selecting any two of the five zeros as coefficients yields the numerator of a second-order IIR digital filter. Therefore, there are many ways to construct a second-order IIR digital filter using six poles and five zeros.
[0081] From the perspective of stability, the poles can be sorted from small to large according to their stability, so as to obtain the best way to cascade the second-order IIR filter.
[0082] In one example, the above sorting may illustratively include:
[0083] If conjugate complex poles and real poles exist, place the conjugate complex poles before all real poles.
[0084] That is, first divide the poles into complex poles and real poles, with the complex poles placed in front and the real poles placed in the back.
[0085] Because the coefficients of the original high-order filter are all real numbers, the resulting poles or zeros, if complex, must exist as conjugate complex numbers (the definition of a conjugate complex number is: the real parts are equal, and the imaginary parts are opposite). Zeros and poles other than conjugate complex numbers must be real numbers. For odd-order high-order filters, the total number of zeros or poles is odd. Since complex numbers appear in pairs of conjugate complex numbers, the number of real zeros or poles must be odd.
[0086] Taking Formula 5 as an example, the following Formula 7 can be obtained (pn represents the sorted pole set):
[0087]
[0088] In digital signal systems, the circle with a Z-domain modulus of 1 is the unit circle. Systems whose poles are all within the unit circle are stable, and the closer the poles are to the unit circle, the more unstable they are. Therefore, the pn equations can be further ranked as follows:
[0089] If there are multiple pairs of conjugate complex poles, calculate the first distance between each pair of conjugate complex poles and the unit circle 1;
[0090] Sort multiple pairs of conjugate complex poles by the first distance from smallest to largest;
[0091] If there are multiple real poles, calculate the second distance between each real pole and the unit circle 1;
[0092] Sort multiple real number extreme points by second distance from smallest to largest.
[0093] It should be noted that it is assumed here that all poles are within the unit circle, that is, the original high-order filter is a stable system. Otherwise, the high-order filter has no practical engineering significance.
[0094] In addition, sorting by the first distance from small to large is to give priority to unstable poles, so that unstable poles and zeros are paired, and then the entire cascaded multiple second-order filter system will be the most stable.
[0095] Then pn can be further sorted to obtain the following sorted extreme point set (pnn):
[0096]
[0097] After sorting, one or more rounds of filter coefficient assignment operations may be performed to assign poles and zeros, thereby obtaining second-order IIR filter coefficients.
[0098] The following four cases are considered: there is a conjugate complex pole in the sorted pole set, there is no conjugate complex pole but there are at least two real poles, there is no conjugate complex pole and there is only one real pole, and the sorted pole set is empty but the zero set is not empty.
[0099] The following describes the specific implementation methods of allocating poles and zeros for different situations.
[0100] Case 1: There are conjugate complex poles in the sorted pole set.
[0101] 1. Pole allocation:
[0102] The first pair of conjugate complex poles are selected from the sorted pole set in order as the roots of the denominator in the target transfer function: the selected conjugate complex poles are the target poles;
[0103] Eliminate the target pole from the sorted pole set.
[0104] Taking the pole set shown in Formula 8 as an example, in the first round of filter coefficient allocation operation, the conjugate complex poles selected are: 2025 / 2123+j*187 / 2012 and 2025 / 2123-j*187 / 2012, which are the roots of the denominator. The denominator can be expressed as:
[0105] (1-(2025 / 2123+j*187 / 2012)*z -1 )*(1-(2025 / 2123-j*187 / 2012)*z -1 )
[0106] 2. Zero point allocation:
[0107] To select the zero point closest to the target pole from the zero point set, the following operations can be performed:
[0108] Operation a: If there is a conjugate complex zero pair in the zero point set, select the conjugate complex zero pair closest to the target pole as the root of the numerator in the target transfer function.
[0109] Taking the zero point set shown in Formula 6 as an example, in the first round of filter coefficient allocation operation, the conjugate zero point pairs selected with the shortest distance from the target pole include:
[0110] 651 / 545+438 / 4799*j, and 651 / 545-438 / 4799*j. As the root of the molecule, the molecule can be expressed as:
[0111] (1-(651 / 545+438 / 4799*j)*z -1 )*(1-(651 / 545-438 / 4799*j)*z -1 )
[0112] In this way, the transfer function of the first second-order IIR filter is obtained as:
[0113]
[0114] Similarly, the transfer function of the second second-order IIR digital filter can be obtained as:
[0115]
[0116] Operation b: If there is no conjugate zero in the zero point set but there are at least two real zeros, select the two real zeros closest to the target conjugate complex pole as the roots of the numerator in the target transfer function.
[0117] Operation c: If there is only one real zero point in the zero point set, select the only real zero point as the root of the numerator in the target transfer function and multiply the numerator by z -1 .
[0118] It should be noted that when the numerator is multiplied by z -1 , is to make the numerator contain z after it is expanded into a polynomial -2 This item ensures the correspondence between zero poles and filter order, otherwise an error will occur, the same below.
[0119] Operation d: If the zero point set is empty, the numerator of the target transfer function is 1 and multiplied by z -2 .
[0120] Operation e: Eliminate the selected zero point from the zero point set.
[0121] Case 2: There is no conjugate complex pole in the sorted pole set but there are at least two real poles.
[0122] 1. Pole allocation:
[0123] Select two real poles from the sorted pole set in order as the roots of the denominator in the target transfer function: the selected real poles are the target poles;
[0124] Eliminate the target pole from the sorted pole set.
[0125] Still taking the pole set shown in Equation 8 as an example, after the first and second rounds of filter coefficient allocation operations, the remaining poles are 1409 / 1494 and 0. Therefore, these two real poles can be assigned to the third second-order IIR digital filter as the roots of its denominator. The denominator part can be expressed as:
[0126] (1-0*z -1 )*(1-1409 / 1494*z -1 ).
[0127] 2. Zero point allocation:
[0128] Operation a: If there is a conjugate complex zero pair in the zero point set, select the conjugate complex zero pair closest to the target pole as the root of the numerator in the target transfer function;
[0129] Specifically, the two conjugate complex zeros closest to the real pole closer to the unit circle (using the previous example, 1409 / 1494) of the two real poles can be selected.
[0130] Operation b: If there is no conjugate zero in the zero point set but there are at least two real zero points, select the two real zero points closest to the target pole as the roots of the numerator of the target transfer function;
[0131] It should be noted that after selecting two real poles (which may be referred to as the first real pole and the second real pole), when allocating real zeros, a real zero that is closest to the first real pole and a real zero that is closest to the second real pole may be selected as the roots of the numerator in the target transfer function.
[0132] Operation c: If there is only one real zero point in the zero point set, select the only real zero point as the root of the numerator in the target transfer function and multiply the numerator by z -1 ;
[0133] Still taking the zero point set shown in Equation 6 as an example, after the first and second rounds of filter coefficient allocation operations, the remaining zero points are 308 / 421. Therefore, this real pole can be assigned to the third second-order second-order IIR digital filter as the root of its numerator. The numerator part can be expressed as:
[0134] z -1 *(1-308 / 421*z -1 ).
[0135] Operation d: If the zero point set is empty, set the numerator of the target transfer function to 1 and multiply it by z -2 .
[0136] Operation e: Eliminate the selected zero point from the zero point set.
[0137] Case 3: There is no conjugate complex pole in the sorted pole set and there is only one real pole.
[0138] 1. Pole allocation:
[0139] Select the real number pole as the root of the denominator in the target transfer function, and the selected real number pole is the target pole;
[0140] Eliminate the target pole from the sorted pole set.
[0141] 2. Zero point allocation:
[0142] Operation a: If there is a conjugate complex zero pair in the zero point set, select the conjugate complex zero pair closest to the target pole as the root of the numerator in the target transfer function;
[0143] Operation b: If there is no conjugate zero in the zero point set but there are at least two real zero points, the two real zero points closest to the target pole are used as the roots of the numerator of the target transfer function;
[0144] Operation c: If there is only one real zero point in the zero point set, select the only real zero point as the root of the numerator in the target transfer function.
[0145] Operation d: If the zero point set is empty, the numerator is 1, and the numerator is multiplied by z -1 ;
[0146] At this time, the molecular part can be expressed as: 1*z -1 .
[0147] Operation e: Eliminate the selected zero point from the zero point set.
[0148] Case 4: The sorted extreme point set is empty, but the zero point set is not empty.
[0149] 1. Pole allocation:
[0150] Let the denominator in the target transfer function be 1;
[0151] 2. Zero point allocation:
[0152] If there is a conjugate complex zero point pair in the zero point set, select a pair of conjugate complex zero point pairs as the roots of the numerator in the target transfer function;
[0153] If there is no conjugate zero point in the zero point set but there are at least two real zero points, the two real zero points are selected as the roots of the numerator of the target transfer function;
[0154] If there is only one real zero point in the zero point set, the only real zero point is selected as the root of the numerator in the target transfer function;
[0155] Eliminate the selected zero point from the zero point set.
[0156] If the zero point set is empty, the conversion ends.
[0157] Taking the above-mentioned sixth-order IRR digital filter as an example, the transfer functions of the first to third second-order IRR digital filters corresponding to it are expanded into polynomial form as follows:
[0158]
[0159]
[0160]
[0161] The final conversion result of the sixth-order IRR digital filter is:
[0162] H(z)=K*H1(z)*H2(z)*H3(z).
[0163] Of course, the transfer function of one of the second-order IIR digital filters may also be multiplied by a fixed coefficient K.
[0164] Figure 3 The full process of assigning poles and zeros for the above four cases is shown.
[0165] The generation device is described below.
[0166] Figure 4 An exemplary structure of the above-mentioned generating device is shown, including:
[0167] Multiple second-order IIR digital filters;
[0168] Memory 41, for storing computer programs or instructions;
[0169] The processing unit 42 is configured to call the computer program or instruction from the memory to execute the above-mentioned generation method.
[0170] For specific details, please refer to the previous description in this article and will not be repeated here.
[0171] In other embodiments of the present invention, in terms of configuring the transfer characteristics of a second-order IIR digital filter based on a zero set and a pole set to obtain a plurality of configured second-order IIR digital filters, the processing unit is specifically configured to:
[0172] Sort the m poles from small to large according to their stability to obtain a sorted pole set;
[0173] Multiple rounds of filter coefficient allocation operations are performed based on the zero point set and the sorted pole set until all zero points in the zero point set and all poles in the sorted pole set are configured, thereby obtaining a plurality of configured second-order IIR digital filters.
[0174] The second-order IIR digital filter corresponding to any round of filter coefficient allocation operation is the target second-order IIR digital filter; the transfer function corresponding to the target second-order IIR digital filter is the target transfer function;
[0175] Any round of filter coefficient allocation operations includes:
[0176] Assigning poles to the target transfer function based on the sorted pole set; the assigned poles are the target poles;
[0177] Select the zero point closest to the target pole from the zero point set as the zero point of the target transfer function;
[0178] After the transfer function of each configured second-order IIR filter is expanded into a form of multiplication of polynomials, the coefficients in the numerator and denominator of the polynomial are the filter coefficients of the corresponding second-order IIR filter.
[0179] For specific details, please refer to the previous description in this article and will not be repeated here.
[0180] In other embodiments of the present invention, in terms of sorting the stability from small to large, the processing unit is specifically configured to:
[0181] If there are conjugate complex poles and real poles, place the conjugate complex poles before all real poles;
[0182] If there are multiple pairs of conjugate complex poles, calculate the first distance between each pair of conjugate complex poles and the unit circle 1;
[0183] Sort multiple pairs of conjugate complex poles by the first distance from smallest to largest;
[0184] If there are multiple real poles, calculate the second distance between each real pole and the unit circle 1;
[0185] Sort multiple real number extreme points by second distance from smallest to largest.
[0186] For specific details, please refer to the previous description in this article and will not be repeated here.
[0187] In other embodiments of the present invention, in terms of allocating poles to the target transfer function based on the sorted pole set, the processing unit is specifically configured to:
[0188] If there are conjugate complex poles in the sorted pole set, the first pair of conjugate complex poles are selected from the sorted pole set in order as the roots of the denominator in the target transfer function: the selected conjugate complex poles are the target poles;
[0189] Eliminate the target pole from the sorted pole set;
[0190] Accordingly, in terms of selecting the zero point closest to the target pole from the zero point set, the processing unit is specifically configured to:
[0191] If there are conjugate complex zero pairs in the zero set, select the conjugate complex zero pair closest to the target pole as the root of the numerator of the target transfer function; or
[0192] If there is no conjugate zero in the zero set but there are at least two real zeros, select the two real zeros closest to the target conjugate complex pole as the roots of the numerator of the target transfer function; or
[0193] If there is only one real zero point in the zero point set, select the only real zero point as the root of the numerator in the target transfer function and multiply the numerator by z -1 ;or
[0194] If the zero point set is empty, set the numerator of the target transfer function to 1 and multiply it by z -2 ;
[0195] Eliminate the selected zero point from the zero point set.
[0196] For specific details, please refer to the previous description in this article and will not be repeated here.
[0197] In other embodiments of the present invention, in terms of allocating poles to the target transfer function based on the sorted pole set, the processing unit is specifically configured to:
[0198] If there is no conjugate complex pole in the sorted pole set but there are at least two real poles, two real poles are selected from the sorted pole set in order as the roots of the denominator in the target transfer function: the selected real poles are the target poles;
[0199] Eliminate the target pole from the sorted pole set;
[0200] Accordingly, in terms of selecting the zero point closest to the target pole from the zero point set, the processing unit is specifically configured to:
[0201] If there are conjugate complex zero pairs in the zero set, select the conjugate complex zero pair closest to the target pole as the root of the numerator of the target transfer function; or
[0202] If there is no conjugate zero in the zero set but there are at least two real zeros, select the two real zeros closest to the target pole as the roots of the numerator of the target transfer function; or
[0203] If there is only one real zero point in the zero point set, select the only real zero point as the root of the numerator in the target transfer function and multiply the numerator by z -1 ;or
[0204] If the zero point set is empty, set the numerator of the target transfer function to 1 and multiply it by z -2 ;
[0205] Eliminate the selected zero point from the zero point set.
[0206] For specific details, please refer to the previous description in this article and will not be repeated here.
[0207] In other embodiments of the present invention, in terms of allocating poles to the target transfer function based on the sorted pole set, the processing unit is specifically configured to:
[0208] If there is no conjugate complex pole in the sorted pole set and there is only one real pole, the real pole is selected as the root of the denominator in the target transfer function: the selected real pole is the target pole;
[0209] Eliminate the target pole from the sorted pole set;
[0210] Accordingly, in terms of selecting the zero point closest to the target pole from the zero point set, the processing unit is specifically configured to:
[0211] If there is a conjugate complex zero pair in the zero set, select the conjugate complex zero pair closest to the target pole as the root of the numerator of the target transfer function; or
[0212] If there is no conjugate zero in the zero point set but there are at least two real zero points, the two real zero points closest to the target pole are used as the roots of the numerator of the target transfer function; or
[0213] If there is only one real zero point in the zero point set, select the only real zero point as the root of the numerator in the target transfer function; or
[0214] If the zero point set is empty, the numerator is 1 and the numerator is multiplied by z -1 ;
[0215] Eliminate the selected zero point from the zero point set.
[0216] For specific details, please refer to the previous description in this article and will not be repeated here.
[0217] In other embodiments of the present invention, in terms of allocating poles to the target transfer function based on the sorted pole set, the processing unit is specifically configured to:
[0218] If the sorted pole set is empty, but the zero set is not empty, let the denominator in the target transfer function be 1;
[0219] Accordingly, in terms of selecting the zero point closest to the target pole from the zero point set, the processing unit is specifically configured to:
[0220] If there is a conjugate complex zero point pair in the zero point set, select a pair of conjugate complex zero point pairs as the roots of the numerator in the target transfer function;
[0221] If there is no conjugate zero point in the zero point set but there are at least two real zero points, the two real zero points are selected as the roots of the numerator of the target transfer function;
[0222] If there is only one real zero point in the zero point set, the only real zero point is selected as the root of the numerator in the target transfer function;
[0223] Eliminate the selected zero point from the zero point set.
[0224] For specific details, please refer to the previous description in this article and will not be repeated here.
[0225] In other embodiments of the present invention, before cascading the plurality of configured second-order IIR digital filters, the processing unit is further configured to:
[0226] The transfer function of one of the second-order IIR digital filters is multiplied by a fixed coefficient K. The ratio of the transfer function of the N-order digital filter to the multiplication result of the transfer functions of the multiple configured second-order digital filters is equal to K.
[0227] For specific details, please refer to the previous description in this article and will not be repeated here.
[0228] An embodiment of the present invention further provides a digital signal processing system, which includes an N-order IIR digital filter composed of multiple cascaded second-order IIR digital filters according to the above generation method, or includes the above generation device.
[0229] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.
[0230] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as within the scope of protection of the present invention.
Claims
1. A method for generating a digital filter, characterized in that: Used to generate N-order IIR digital filter; N is a positive integer greater than 2; The method comprises: Obtaining a zero point set and a pole set corresponding to the transmission characteristics of the N-order IIR digital filter; wherein the zero point set includes n zero points, and the pole set includes m poles; n and m are positive integers; Configuring the transmission characteristics of a second-order IIR digital filter based on the zero set and the pole set to obtain a plurality of configured second-order IIR digital filters; the transmission characteristics are jointly determined by the zeros and the poles; wherein the poles corresponding to any configured second-order IIR digital filter belong to the pole set, and the zeros corresponding to any configured second-order IIR digital filter include: among the n zeros, the zero that is closest to the pole corresponding to any configured second-order IIR digital filter; cascading a plurality of configured second-order IIR digital filters to obtain the N-order IIR digital filter; Configuring the transmission characteristics of the second-order IIR digital filter based on the zero set and the pole set to obtain a plurality of configured second-order IIR digital filters includes: sorting the m poles from small to large according to stability to obtain a sorted pole set; The sorting by stability from small to large includes: if there are conjugate complex poles and real poles, placing the conjugate complex poles before all real poles; if there are multiple pairs of conjugate complex poles, calculating the first distance between each pair of conjugate complex poles and the unit circle 1; sorting the multiple pairs of conjugate complex poles from small to large according to the first distance; if there are multiple real poles, calculating the second distance between each real pole and the unit circle 1; and sorting the multiple real poles from small to large according to the second distance.
2. The method according to claim 1, wherein The configuring the transmission characteristics of the second-order IIR digital filter based on the zero set and the pole set to obtain a plurality of configured second-order IIR digital filters further comprises: Multiple rounds of filter coefficient allocation operations are performed based on the zero point set and the sorted pole set until all zero points in the zero point set and all poles in the sorted pole set are configured, thereby obtaining a plurality of configured second-order IIR digital filters.
3. The method according to claim 2, wherein The transmission characteristics of the configured second-order IIR digital filter are characterized by the filter coefficients; The second-order IIR digital filter corresponding to any round of filter coefficient allocation operation is the target second-order IIR digital filter; The transfer function of the target second-order IIR digital filter is the target transfer function; Any round of filter coefficient allocation operations includes: assigning poles to the target transfer function based on the sorted pole set; the assigned poles are target poles; Selecting a zero point closest to the target pole from the zero point set as the zero point of the target transfer function; the assigned zero point is the target zero point; Expand the transfer function after allocating target poles and target zeros into a form of polynomial multiplication; The coefficients in the numerator and denominator of the polynomial are determined as filter coefficients of the target second-order IIR digital filter.
4. The method according to claim 3, wherein The assigning poles to the target transfer function based on the sorted pole set comprises: If there are conjugate complex poles in the sorted pole set, selecting the first pair of conjugate complex poles from the sorted pole set in order as roots of the denominator in the target transfer function: the selected conjugate complex poles are the target poles; Eliminate the target pole from the sorted pole set; The step of selecting the zero point closest to the target pole from the zero point set includes: If there are conjugate complex zero point pairs in the zero point set, select the conjugate complex zero point pair closest to the target pole as the root of the numerator of the target transfer function; or If there is no conjugate zero point in the zero point set but there are at least two real zero points, select the two real zero points closest to the target pole as the roots of the numerator of the target transfer function; or If there is only one real zero point in the zero point set, the only real zero point is selected as the root of the numerator of the target transfer function, and the numerator is multiplied by ;or If the zero point set is empty, let the numerator of the target transfer function be 1 and multiply it by ; Eliminating the selected zero point from the zero point set; Among them, the z is the independent variable.
5. The method according to claim 3, wherein The assigning poles to the target transfer function based on the sorted pole set comprises: If there is no conjugate complex pole in the sorted pole set but there are at least two real poles, selecting two real poles from the sorted pole set in order as roots of the denominator in the target transfer function: the selected real poles are the target poles; Eliminate the target pole from the sorted pole set; The step of selecting the zero point closest to the target pole from the zero point set includes: If there are conjugate complex zero point pairs in the zero point set, select the conjugate complex zero point pair closest to the target pole as the root of the numerator of the target transfer function; or If there is no conjugate zero point in the zero point set but there are at least two real zero points, select the two real zero points closest to the target pole as the roots of the numerator of the target transfer function; or If there is only one real zero point in the zero point set, the only real zero point is selected as the root of the numerator of the target transfer function, and the numerator is multiplied by ;or If the zero point set is empty, let the numerator of the target transfer function be 1 and multiply it by ; Eliminating the selected zero point from the zero point set; Among them, the z is the independent variable.
6. The method according to claim 3, wherein The assigning poles to the target transfer function based on the sorted pole set comprises: If there is no conjugate complex pole in the sorted pole set and there is only one real pole, selecting the real pole as the root of the denominator in the target transfer function: the selected real pole is the target pole; Eliminate the target pole from the sorted pole set; The step of selecting the zero point closest to the target pole from the zero point set includes: If there is a conjugate complex zero pair in the zero point set, select the conjugate complex zero pair closest to the target pole as the root of the numerator in the target transfer function; or If there is no conjugate zero point in the zero point set but there are at least two real zero points, the two real zero points closest to the target pole are used as roots of the numerator of the target transfer function; or If there is only one real zero point in the zero point set, the only remaining real zero point is selected as the root of the numerator in the target transfer function; or If the zero point set is empty, the numerator is 1, and the numerator is multiplied by ; Eliminating the selected zero point from the zero point set; Among them, the z is the independent variable.
7. The method according to claim 3, wherein The assigning poles to the target transfer function based on the sorted pole set comprises: If the sorted pole set is empty, but the zero set is not empty, set the denominator in the target transfer function to 1; The step of selecting the zero point closest to the target pole from the zero point set includes: If there is a conjugate complex zero point pair in the zero point set, selecting a pair of conjugate complex zero point pairs as roots of the numerator in the target transfer function; or If there is no conjugate zero point in the zero point set but there are at least two real zero points, select the two real zero points as roots of the numerator in the target transfer function; or If there is only one real zero point in the zero point set, selecting the only remaining real zero point as the root of the numerator in the target transfer function; The selected zero point is removed from the zero point set.
8. The method according to claim 3, wherein Before cascading multiple configured second-order IIR digital filters, it also includes: The transfer function of one of the second-order IIR digital filters is multiplied by a fixed coefficient K; the ratio of the multiplication result of the transfer function of the N-order IIR digital filter and the transfer functions of the multiple configured second-order IIR digital filters is equal to the K.
9. A digital filter generating device, characterized in that: include: Multiple second-order IIR digital filters; Memory for storing computer programs or instructions; A processing unit, configured to call the computer program or instruction from a memory to execute the method according to any one of claims 1 to 8.
10. A digital signal processing system, characterized in that: An N-order IIR digital filter comprising a plurality of second-order IIR digital filters constructed according to the method of claims 1-8; N being a positive integer greater than 2; or a digital filter generating device according to claim 9.
Citation Information
Patent Citations
Digital up / down frequency conversion system and implementation method thereof
CN101977020A