Filter design device, filter design method, and program
The filter design device optimizes digital filters by considering available bit lengths, using LASSO and Least Angle Regression, reducing the need for ad hoc adjustments and ensuring appropriate filter usage.
Patent Information
- Application Number
- JP2023031812
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2023-03-02
- Publication Date
- 2024-09-12
AI Technical Summary
Conventional digital filter designs do not consider the bit length required to express filter coefficients, leading to the need for ad hoc adjustments when deployed, which can result in inappropriate filter usage.
A filter design device and method that optimizes digital filters by determining the sum of representation bit lengths of each coefficient based on the available bit lengths in the target environment, using techniques like LASSO and Least Angle Regression to minimize the design cost function while ensuring the bit length condition is met.
Reduces the frequency of ad hoc adjustments needed for digital filters by optimizing the bit lengths of filter coefficients, ensuring they are appropriate for the intended environment.
Smart Images

Figure 2024123961000001
Abstract
Description
[Technical field]
[0001] An embodiment of the present invention relates to a filter design apparatus, a filter design method, and a program. [Background technology]
[0002] Digital filters are digital signal processing circuits consisting of multipliers, adders, and delays, and are used in many fields, including communications, speech and audio processing, image processing, and measurement and control. In particular, when implementing digital filters in small devices such as smartphones and hearing aids, it is highly desirable to operate them with low power consumption. Digital filters are classified into finite impulse response (FIR) filters and infinite impulse response (IIR) filters based on the difference in transfer function.
[0003] IIR filters can achieve the same accuracy as FIR filters with a small order, but because the transfer function has a denominator polynomial, it is necessary to design them while taking into consideration stability conditions. In recent years, there has been active research into technology that applies sparse modeling to the design of digital filters. Specifically, research is being conducted into technology that achieves more accurate characteristics than conventional design methods by designing digital filters to have zero coefficients. [Prior art documents] [Non-patent literature]
[0004] [Non-Patent Document 1] Tomohiro Hirakawa, Masayoshi Nakamoto, Toru Yamamoto, "A Design of Sparse IIR Digital Filters Using Lagrange Undetermined Multiplier Method", 57th Joint Conference on Automatic Control, November 10-12, 2014 Summary of the Invention [Problem to be solved by the invention]
[0005] However, in the conventional technology, the design does not take into consideration the bit length required to express the filter coefficients. Therefore, in the scene where the filter is actually used, it is necessary to change the design to match the available memory consumption. When making the change, since there is no appropriate policy for the change, the bit length required to express the filter coefficients is reduced by a predetermined length regardless of the filter coefficient, or the number of filters whose coefficients are non-zero is reduced one by one. In this way, in the conventional technology, digital filters may be obtained ad hoc, that is, by ideas on the spot. As a result, the digital filters used may not necessarily be appropriate.
[0006] In view of the above circumstances, an object of the present invention is to provide a technique for reducing the frequency with which ad-hoc digital filters are used. [Means for solving the problem]
[0007] One aspect of the present invention is a filter design device including a control unit that performs optimization of a digital filter to be designed, satisfying a bit length condition that a sum of expression bit lengths of filter coefficients of the design object is equal to or less than a sum of bit lengths usable for expressing the filter coefficients in a scene in which the design object will be used after design.
[0008] One aspect of the present invention is a filter design method comprising: a control step of optimizing a digital filter to be designed, the optimization satisfying a bit length condition that a sum of expression bit lengths of filter coefficients of the design object is equal to or less than a sum of bit lengths usable for expressing the filter coefficients in a scene in which the design object will be used after the design is completed.
[0009] One aspect of the present invention is a program for causing a computer to function as the above-mentioned filter design device. Effect of the Invention
[0010] According to the present invention, it is possible to reduce the frequency with which ad-hoc digital filters are used. [Brief description of the drawings]
[0011] [Figure 1] FIG. 1 is an explanatory diagram illustrating an overview of a filter design apparatus according to an embodiment. [Diagram 2] FIG. 2 is a diagram illustrating an example of a hardware configuration of a filter design apparatus according to an embodiment. [Diagram 3] 4 is a flowchart showing an example of a flow of a process executed by a filter design device in the embodiment. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0012] (Embodiment) 1 is an explanatory diagram illustrating an overview of a filter design device 1 according to an embodiment. The filter design device 1 includes a control unit 11 including a processor 91 such as a CPU and a memory 92 connected by a bus, and executes a program.
[0013] The control unit 11 performs design of a digital filter as a design object. The control unit 11 optimizes the digital filter to be designed, and performs optimization that satisfies a bit length condition. That is, the control unit 11 optimizes the filter coefficients of the digital filter to be designed, and performs optimization that includes a bit length condition as one of the constraints. The bit length condition is a condition that the sum of the expression bit lengths of the filter coefficients of the digital filter to be designed is equal to or less than the sum of the bit lengths usable for expressing the filter coefficients in a scene in which the design object will be used after design. Note that the expression bit length means the bit length for expressing the object of expression. Therefore, the expression bit length of the filter coefficients is the bit length required to express the value of the filter coefficients.
[0014] The optimization process will be described in more detail below using mathematical expressions. For simplicity, the optimization of the digital filter will be described by gradually increasing the constraint conditions. In this way, the optimization performed by the control unit 11 will be described.
[0015] The characteristics of a digital filter are generally expressed by the following transfer function:
[0016]
number
[0017] Here, ω represents the angular frequency, and H(ω) represents the transfer function of the digital filter at the angular frequency ω. Here, A(ω) represents the recursive structure part of the digital filter, B(ω) represents the non-recursive structure part of the digital filter, p represents the highest order of the non-recursive structure part, q represents the highest order of the recursive structure part, bk and ak represent the filter coefficients, and j is the imaginary unit.
[0018] The design of a digital filter represented by such a transfer function is reduced to a minimization problem of minimizing, for example, the following cost function:
[0019]
number
[0020] W represents a weighting function that specifies the importance of each frequency component. H d represents the target filter characteristic. The vector v is a vector whose elements are filter coefficients. Specifically, the vector v is a vector expressed by the following equation (3). 0 is a predetermined constant that does not depend on the vector v. The vector θ is a vector whose elements are the weights of the first-order terms of the filter coefficients. The predetermined constant is a quantity that can be ignored in optimization. In other words, ρo may be zero, for example.
[0021] Therefore, the cost function to be minimized in the design of a digital filter is expressed as 2θv+v, where v is the filter coefficient and θ is the weight of the first-order term of the filter coefficient. Tθv (hereinafter referred to as the "design cost function"), where T means transposition.
[0022]
number
[0023] When the optimization of H(ω) is an optimization in which the denominator is fixed and the numerator is optimized, equation (1) is equivalent to the following equation (4).
[0024]
number
[0025] The definitions of vector a and vector b in equation (4) are as shown in equation (5) below.
[0026]
number
[0027] Here, optimization that has a constraint that restricts the number of non-zero filter coefficients will be described.
[0028] In optimization where one of the constraints is that the filter coefficients be sparse (hereinafter referred to as the "sparse condition"), the least absolute shrinkage and selection operator (LASSO) is often used.
[0029] In LASSO, the observation vector y expressed by equation (6) is divided into p feature vectors x j The optimization is performed under the condition that the feature vector x j is a vector expressed by the following equation (7).
[0030]
number
[0031]
number
[0032] The feature vector x in the linear sum above that represents the observation vector y j The weighting coefficient of w i and the weighting coefficient vector is defined as vector b expressed by the following equation (8), the optimization of a digital filter using LASSO is specifically the optimization expressed by the following equation (9).
[0033]
number
[0034]
number
[0035] λ represents the Lagrange multiplier. X is x j The matrix X=(x 0 ,…,x p-1 ).
[0036] By expanding the first term of equation (9), we obtain the following equation (10).
[0037]
number
[0038] By utilizing the relationships in the following equations (11) and (12), equation (4) can be converted into equation (10).
[0039]
number
[0040]
number
[0041] Here, the value of X obtained by Cholesky decomposition that satisfies formula (11) (hereinafter, "X + ") and equation (12), the quantity expressed on the left side of the following equation (13) is defined.
[0042]
number
[0043] In designing a digital filter under the sparse condition for the filter coefficient b, we replace X in equation (9) with X + By replacing Y with the quantities on the left side of equation (13), it is possible to perform a design using LASSO.
[0044] Incidentally, a digital filter designed under sparsity conditions for the filter coefficients is called a sparse filter.
[0045] <Optimization of sparse filters under bit-quantity constraints> Now, we will explain the optimization of the filter coefficients of the digital filter to be designed, which includes the bit amount condition as one of the constraints.
[0046] The control unit 11 optimizes the representation bit length of non-zero coefficients in addition to the positions of non-zero filter coefficients (hereinafter referred to as "non-zero coefficients"). Note that optimizing the positions of non-zero coefficients is a process of determining coefficients with non-zero values and coefficients with zero values so as to satisfy optimization conditions.
[0047] The control unit 11 executes, for example, a coefficient estimation process and an optimal combination estimation process as an optimization of filter coefficients of the digital filter to be designed, the optimization including a bit amount condition as one of the constraint conditions. The coefficient estimation process includes a free optimization process, a filter determination process, and a representation bit length estimation process. The free optimization process is a process for optimizing a transfer function of the digital filter to be designed without imposing a length constraint on the representation bit length of each filter coefficient in the digital filter to be designed. The transfer function of the digital filter to be designed means a transfer function that expresses the characteristics of the digital filter to be designed.
[0048] The filter determination process is a process for determining, based on the result of the free optimization process, which filter coefficients of the digital filter to be designed have non-zero values and which have non-zero values. Since the determination of whether a value is zero or not is a determination of whether a value is one of two values, it is a determination of whether a value is non-zero or not.
[0049] Moreover, the determination of whether a value is zero or not is a determination that naturally reveals whether a value is zero by determining whether it is non-zero. Therefore, the filter determination process may be a process of determining filter coefficients whose values are non-zero among the filter coefficients of the digital filter to be designed, or a process of determining filter coefficients whose values are zero among the filter coefficients of the digital filter to be designed.
[0050] The representation bit length estimation process is a process of estimating the representation bit length of a filter coefficient determined to be non-zero by the non-filter determination process. The coefficient estimation process is, for example, a process of executing LASSO. The execution of LASSO is performed, for example, by Least Angle Regression (LARS).
[0051] The optimum combination estimation process is a process for estimating an expression bit combination that minimizes a design cost function, from among the expression bit combinations included in the expression bit combination set. The expression bit combination set is a set of expression bit combinations. The expression bit combination is a combination of the expression bit lengths of the filter coefficients of the digital filter to be designed, and is a combination that satisfies a first combination condition, a second combination condition, a third combination condition, and a fourth combination condition.
[0052] The first combination condition is a condition in which the value of a filter coefficient expressed as having a value of zero by the filter determination process is zero, and the value of a filter coefficient expressed as having a value of non-zero by the filter determination process is non-zero.
[0053] The second combination condition is a condition that the sum of the expression bit lengths of the filter coefficients is equal to or less than the sum of the bit lengths usable for expressing the filter coefficients in a scene in which the designed object is used after the design.
[0054] The third combination condition is that the representation bit length of the combination differs from that of the other combinations of representation bits for at least one non-zero coefficient.
[0055] The fourth combination condition is that the representation bit length of each non-zero coefficient is equal to or less than the representation bit length of each non-zero coefficient estimated by the representation bit length estimation process. Therefore, if the representation bit length of the non-zero coefficient A estimated by the representation bit length estimation process is l max_A and the representation bit length estimated by the representation bit length estimation process of the non-zero coefficient B is l max_B If , the representation bit length of the non-zero coefficient A in the representation bit combination is 0 or more l max_A The representation bit length of the non-zero coefficient B in the representation bit combination is 0 to l max_B The following is the result.
[0056] The optimization that satisfies the second combination condition is optimization that satisfies the bit length condition. Therefore, the execution of the coefficient estimation process and the optimal combination estimation process is optimization of the digital filter to be designed, and is an example of optimization that satisfies the bit length condition.
[0057] In addition, when each zero filter coefficient obtained by LARS is expressed as a floating point number of lmax bits, the control unit 11 obtains the value of the design cost function when, for example, l=1,2,...,lmax, with the bit length of the mantissa for the non-zero coefficient being α, the bit length of the exponent being β, and the sum of the bit lengths of the mantissa and exponent being α+β=l. However, in this case, the control unit 11 verifies the following l combinations of (α,β) that satisfy α+β=l for each l: (α,β)={(1,l-1),(2,l-2),...(l-1,1)}. Then, the control unit 11 obtains the value of the design cost function for the number of non-zero coefficients and the combination of the bit lengths of the mantissa and exponent for each bit length per coefficient. Furthermore, the control unit 11 estimates a combination that minimizes the value of the design cost function among combinations of parameters (the number of non-zero coefficients and the bit lengths of the mantissa and exponent for each bit length per coefficient) that are less than the upper limit of the total number of bits required for the filter configuration.
[0058] 2 is a diagram showing an example of a hardware configuration of the filter design device 1 according to the embodiment. As described above, the filter design device 1 includes a control unit 11 including a processor 91 such as a CPU and a memory 92 connected by a bus, and executes a program. The filter design device 1 functions as a device including the control unit 11, an input unit 12, a communication unit 13, a storage unit 14, and an output unit 15 by executing the program.
[0059] More specifically, the processor 91 reads out a program stored in the storage unit 14, and stores the read out program in the memory 92. The processor 91 executes the program stored in the memory 92, whereby the filter design device 1 functions as a device including a control unit 11, an input unit 12, a communication unit 13, a storage unit 14, and an output unit 15.
[0060] The control unit 11 controls the operations of various functional units that the filter design device 1 has.
[0061] The input unit 12 includes input devices such as a mouse, a keyboard, and a touch panel. The input unit 12 may be configured as an interface that connects these input devices to the filter design device 1. The input unit 12 accepts input of various information to the filter design device 1. For example, usable bit total length information is input to the input unit 12. The usable bit total length information is information that indicates the sum of bit lengths that can be used to express each filter coefficient in a scene in which the design target will be used after design.
[0062] The communication unit 13 includes a communication interface for connecting the filter design device 1 to an external device. The communication unit 13 communicates with the external device via wired or wireless communication. The external device is, for example, a device that is a source of available bit total length information. The communication unit 13 acquires available bit total length information by communicating with the device that is a source of the available bit total length information.
[0063] The storage unit 14 is configured using a computer-readable storage medium device (non-transitory computer-readable recording medium) such as a magnetic hard disk device or a semiconductor storage device. The storage unit 14 stores various information related to the filter design device 1. The storage unit 14 stores information inputted via the input unit 12 or the communication unit 13, for example. The storage unit 14 stores various information generated by the processing executed by the control unit 11, for example. The storage unit 14 stores a transfer function in which the filter coefficient values are preset to predetermined initial values.
[0064] The output unit 15 outputs various types of information. The output unit 15 includes a display device such as a CRT (Cathode Ray Tube) display, a liquid crystal display, or an organic EL (Electro-Luminescence) display. The output unit 15 may be configured as an interface that connects these display devices to the filter design device 1. The output unit 15 outputs information input to the input unit 12 or the communication unit 13, for example. The output unit 15 may output various types of information generated by processing executed by the control unit 11, for example.
[0065] 3 is a flowchart showing an example of a flow of processing executed by the filter design device 1 in the embodiment. The control unit 11 acquires available bit total length information via the input unit 12 or the communication unit 13 (step S101). Next, the control unit 11 executes a coefficient estimation process (step S102). Next, the control unit 11 executes an optimal combination estimation process (step S103).
[0066] As described above, in the optimal combination estimation process, a combination that minimizes the design cost function is estimated for the combination of filter coefficients that satisfy the first to fourth combination conditions including the second combination condition. The sum of bit lengths available for expressing each filter coefficient in a scene in which the design target after designing is used under the second combination condition is the bit length indicated by the information on the total available bit length obtained in step S101.
[0067] Therefore, in step S103, an element that minimizes the design cost function is estimated from among elements of a set of combinations of filter coefficients that satisfy the condition that the sum of the representation bit lengths of each filter coefficient is equal to or less than the bit length indicated by the total usable bit length information and the first, third, and fourth combination conditions.
[0068] The value of each filter coefficient indicated by the combination estimated in step S103 is the value of each filter coefficient in the design object after optimization. Therefore, it can be said that the design object is optimized by steps S101 to S103.
[0069] The filter design device 1 of the embodiment configured as described above performs optimization on the digital filter to be designed to satisfy the bit length condition. Therefore, a digital filter optimized by the filter design device 1 does not need to be modified in an ad hoc manner according to the usage environment by an installer who installs the designed digital filter in the usage environment. Therefore, the filter design device 1 can reduce the frequency with which a digital filter obtained in an ad hoc manner is used.
[0070] (Modification) The filter design device 1 may be implemented using a plurality of information processing devices communicably connected via a network. In this case, each functional unit of the filter design device 1 may be distributed and implemented in the plurality of information processing devices.
[0071] All or part of the functions of the filter design device 1 may be realized using hardware such as an ASIC (Application Specific Integrated Circuit), a PLD (Programmable Logic Device), or an FPGA (Field Programmable Gate Array). The program may be recorded on a computer-readable recording medium. Examples of the computer-readable recording medium include portable media such as flexible disks, magneto-optical disks, ROMs, and CD-ROMs, and storage devices such as hard disks built into a computer system. The program may be transmitted via a telecommunications line.
[0072] Although some embodiments of the present invention have been described, these embodiments are presented as examples and are not intended to limit the scope of the invention. These embodiments can be implemented in various other forms, and various omissions, substitutions, and modifications can be made without departing from the spirit of the invention. These embodiments and their modifications are included in the scope of the invention and its equivalents described in the claims, as well as in the scope and spirit of the invention. [Explanation of symbols]
[0073] REFERENCE SIGNS LIST 1... filter design device, 11... control section, 12... input section, 13... communication section, 14... storage section, 15... output section, 91... processor, 92... memory
Claims
1. a control unit that performs optimization of a digital filter to be designed, the optimization satisfying a bit length condition that a sum of expression bit lengths of filter coefficients of the design object is equal to or less than a sum of bit lengths usable for expressing the filter coefficients in a scene in which the design object will be used after the design; A filter design apparatus comprising:
2. The control unit, as the optimization, a free optimization process for optimizing the transfer function of the design object without imposing length constraints on the representation bit length of each of the filter coefficients; a filter determination process for determining, based on a result of the free optimization process, filter coefficients of the filter coefficients to be designed that have a non-zero value and non-zero coefficients that are filter coefficients whose values are not zero; a representation bit length estimation process for estimating a representation bit length of a filter coefficient determined to be non-zero by the filter determination process; A coefficient estimation process including: A combination of representation bit lengths of the filter coefficients of the design object, a first combination condition that is a condition in which a value of a filter coefficient expressed as being zero by the filter determination process is zero, and a value of a filter coefficient expressed as being non-zero by the filter determination process is non-zero; A second combination condition that the sum of the bit lengths of the filter coefficients is equal to or less than the sum of the bit lengths available for expressing the filter coefficients in a scene in which the design object is used after the design is completed; The other combinations are a third combination condition that the representation bit length is different for at least one non-zero coefficient; A fourth combination condition is a condition that the representation bit length of each non-zero coefficient is equal to or less than the representation bit length of each non-zero coefficient estimated in the representation bit length estimation process; Among the representation bit combinations included in the representation bit combination set, which is a set of representation bit combinations that satisfy T An optimal combination estimation process for estimating the representation bit combination that minimizes the value of θv; Execute The filter design apparatus of claim 1 .
3. The coefficient estimation process is a process of executing LASSO. The filter design apparatus according to claim 2 .
4. a control step of optimizing a digital filter to be designed, the control step being such that a bit length condition is satisfied that a sum of bit lengths of expression of each filter coefficient of the design object is equal to or less than a sum of bit lengths usable for expressing each filter coefficient in a scene in which the design object will be used after the design is completed; The filter design method includes:
5. A program for causing a computer to function as the filter design device according to any one of claims 1 to 3.
Citation Information
Patent Citations
Coefficient sparse optimization design method for two-channel orthogonal mirror filter bank
CN115221823A
Method for designing digital filter circuit
JP1993197775A
Finite impulse response (FIR) filter compiler
US7110927B1
