1. Field of the Invention
The present invention relates to a filtering technique carried out by using a digital filter.
2. Description of the Background Art
A weight measurement apparatus for measuring a weight of an article typically employs a weight sensor such as a strain gauge load cell or a force balance. The weight sensor has a natural frequency which is subject to a total weight of a weight of an article and a tare thereof. When external vibration at frequencies in a band including the natural frequency acts upon a weight measurement system, external vibration at a frequency close to the natural frequency is amplified, to work as a vibration noise, which then emerges in a weighing signal output from the weight sensor. It is noted that such a vibration noise will be hereinafter referred to as a “natural frequency noise” throughout the present specification.
Also, in measuring a load of a transfer system, a noise caused due to vibration of a rotation system such as a motor for driving a conveyor belt or a transfer roller, or an electrical noise associated with a commercial power supply, works as a vibration noise which is superimposed on a weighing signal.
A weight measurement apparatus developed in recent days has employed a digital filter for eliminating such a vibration noise as described above which is contained in a weighing signal. A digital filter is relatively impervious to influence of aging or an environment, and filtering characteristics thereof can be relatively easily altered. Among various types of digital filters, a finite impulse response (FIR) filter has been preferably employed in view of its excellent stability.
As described above, a natural frequency of a weight sensor is subject to an article weight and a tare. Thus, if an article weight or a tare is changed, it results in change in a frequency of a natural frequency noise associated with the weight sensor. Formerly, change in frequency of a natural frequency noise caused due to change in article weight was negligible because a tare, e.g., a weight of a conveyor, was dominant. However, in recent days, there has been arisen a demand for accurate measurement of a weight of a light article, which involves reduction of a tare. For this reason, such change in frequency of a natural frequency noise caused due to change in article weight has become too significant to neglect. On the other hand, a frequency of a vibration noise associated with a motor or a transfer roller is changed in accordance with specifications of a transfer system such as a transfer speed, for example. Hence, it is desired to achieve a digital filter which is capable of surely eliminating a vibration noise in spite of change in frequency of the vibration noise which occurs due to change in type or size of an article under measurement, or change in specifications of a transfer system.
In accordance with the conventional practices, a digital filter formed of multistage moving average filters is employed in order to surely eliminate a vibration noise contained in a weighing signal, as taught in Japanese Patent Publication No. 6-21814 (hereinafter referred to as “JP 6-21814”).
More specifically, JP 6-21814 teaches a method in which respective moving average values of the multistage moving average filters are differentiated from one another to provide a plurality of notches in a frequency range within which a frequency of a vibration noise would be changed, thereby surely eliminating the vibration noise.
Additionally, an example of a method of designing an FIR filter is described in “Design of FIR Transmitter and Receiver Filters for Data Communication System” by Naoyuki Aikawa et al. in Transaction of IEICE, Vol. J79-A, No. 3, March 1996, pages 608-615, which shows a technique using successive projections method.
According to the method shown in JP 6-21814, a frequency range within which a frequency of a vibration noise would be changed is presumed and the number of stages of the moving average filters is determined in accordance with the frequency range as presumed, in a step of designing a digital filter. As such, in a situation where the frequency of the vibration noise falls outside the presumed frequency range for some reason such as addition of a specification after designing the digital filter, it is required to design a digital filter all over again.
In this regard, to initially design a digital filter which allows for addition of a specification in a weight measurement apparatus requires preparing numerous multistage moving average filters, which results in increase of a circuit scale of the digital filter.
On the other hand, as an alternative to the method taught in JP 6-21814, there has been proposed a method in which a plurality of filter coefficients representing different attenuation characteristics are previously stored. According to this method, each time a frequency of a vibration noise is changed due to change in specifications or the like, one of the stored filter coefficients is retrieved in accordance with a new frequency of the vibration noise after the change, to be used. However, this alternative requires previously storing numerous filter coefficients in order to surely eliminate a vibration noise at a wide range of frequencies, which results in increase of a circuit scale of a memory for storing the filter coefficients.
It is an object of the present invention to provide a filtering technique which makes it possible to easily and appropriately eliminate a noise without increasing a scale of a circuit necessary for a filtering process even if a noise frequency is liable to be changed.
In an aspect of the present invention, a noise eliminating apparatus includes: a signal processor for carrying out a filtering process on a digital signal by using variable filter coefficients; and a filter coefficient calculator for calculating the filter coefficients using a predetermined arithmetic expression and outputting the filter coefficients to the signal processor. The arithmetic expression includes parameters specifying respective band positions of a plurality of attenuation bands where attenuation is to be enhanced locally in a stopband of amplitude characteristics of the filtering process, and the filter coefficient calculator substitutes input values of the parameters into the arithmetic expression, to change the filter coefficients so that the plurality of attenuation bands are independently movable to respective desired band positions specified by the parameters.
The present invention is also intended for a method of eliminating a noise.
The filter coefficients can be changed by using the parameter specifying the band position of the attenuation band which is physical and thus easy to grasp. As such, even when a frequency which must be attenuated is changed, it is possible to easily move the attenuation band by referring to information about a new frequency which must be attenuated. Accordingly, a frequency of a noise, which is liable to be changed, can be filtered out easily and appropriately. Further, since the filter coefficients are obtained by the arithmetic expression, there is no need of preparing multistage filters or previously storing filter coefficients representing different characteristics. This makes it possible to reduce a scale of a circuit necessary for the filtering process and to thus provide a low cost noise eliminating apparatus to users. Moreover, since a plurality of attenuation bands can be specified, a plurality of causes causing a big noise and varying can be dealt with appropriately.
In another aspect of the present invention, a weight measurement apparatus includes: a measurer for detecting a weight of an object; and the noise eliminating apparatus mentioned above for carrying out a filtering process on a digital signal which is obtained as a measurement result by the measurer.
A weight measurement apparatus capable of filtering a noise appropriately can be obtained.
The present invention is also intended for a method of designing a digital filter in which respective band positions of a plurality of attenuation bands where attenuation is to be enhanced locally in a stopband of amplitude characteristics are variable. This method includes the steps of: (a) calculating a plurality of sequences of reference filter coefficients based on reference amplitude characteristics of the digital filter; (b) approximating filter coefficients of the digital filter using a predetermined arithmetic expression including parameters specifying the respective band positions of the plurality of attenuation bands, based on the plurality of sequences of the reference filter coefficients; and (c) calculating the filter coefficients using the predetermined arithmetic expression. The step (c) includes the step of (c-1) substituting values of the parameters into the predetermined arithmetic expression, to change the filter coefficients, and the plurality of attenuation bands are independently moved to respective desired band positions specified by the parameters by performing the step (c-1).
The filter coefficients can be changed by using the parameter specifying the band position of the attenuation band which is physical and thus easy to grasp. As such, even when a frequency which must be attenuated is changed, it is possible to easily move the attenuation band by referring to information about a new frequency which must be attenuated. Accordingly, a frequency of a noise, which is liable to be changed, can be filtered out easily and appropriately. Further, since the filter coefficients are obtained by the arithmetic expression, there is no need of preparing multistage filters. This makes it possible to reduce a scale of a circuit of the digital filter. Moreover, since a plurality of attenuation bands can be specified, a plurality of causes causing a big noise and varying can be dealt with appropriately.
Preferably, each of the parameters is given as the amount of displacement from a center frequency in a range where a corresponding attenuation band among the plurality of attenuation bands is to vary.
A plurality of parameters can be approximated equally in designing a filter, which in turn allows the design of a desired filter.
These and other objects, features, aspects and advantages of the present invention will become more apparent from the following detailed description of the present invention when taken in conjunction with the accompanying drawings.
Before describing a preferred embodiment according to the present invention, a weight measurement apparatus serving as conventional art of the present invention will be described. The conventional art is disclosed in Japanese Patent Application Laid-Open No. 2004-150883 filed by the applicant of the present invention.
The weight sensor 1 detects a weight of an object under measurement, which is notified by a weight measurement system, and outputs a result of the detection to the amplifier 2, as a measurement signal ms. The amplifier 2 amplifies the measurement signal ms input by the weight sensor 1, and outputs it to the analog filter 3, as an amplified signal MS. The analog filter 3 removes an unnecessary higher frequency component from the amplified signal MS, to output a resultant signal as an analog signal As. The ADC 4 samples the analog signal As output from the analog filter 3 at predetermined sampling intervals, to generate a digital signal which is quantized to be represented by the predetermined number of bits and then output the digital signal to the signal processor 5, as a weighing signal Ds.
The signal processor 5 carries out a filtering process on the weighing signal Ds input by the ADC 4, using a FIR filter, and outputs a result of the filtering process to a microcomputer (not illustrated), as a signal Xs. Then, the microcomputer calculates the weight of the object based on the signal Xs and displays a result of the calculation on a display part (not illustrated). It is noted that generally, a frequency response H (ejω) of a 2Nth order FIR filter is expressed by the following equation (1):
In the equation (1), “as” (i=0, 1, 2, . . . , N) represents filter coefficients. Also, “ω” represents a normalized angular frequency, that is, an angular frequency normalized by using a sampling frequency used for a filtering process on data. In the conventional art, an angular frequency which is normalized by using a sampling frequency used for the filtering process on data carried out by the signal processor 5 corresponds to the normalized angular frequency represented by “ω”. It is noted that the terms “normalized angular frequency” will hereinafter mean such an angular frequency as defined above, i.e., an angular frequency which is normalized by using a sampling frequency, throughout the present specification.
The filter coefficient calculator 6 calculates sequences {ai} of the filter coefficients as in the above equation (1) using the following equation (2), and outputs a result of the calculation to the signal processor 5:
In the equation (2), “gi,j” (j=0, 1, 2, . . . M) represents coefficients. Also, “x” represents a parameter specifying a band position of an attenuation band, and a value substituted for x is varied in accordance with the position of the attenuation band. As shown in the equation (2), the filter coefficients ai are expressed by a polynomial including a plurality of terms for the parameter x. Then, by substituting the equation (2) into the equation (1), the frequency response H (ejω) can be expressed by the following equation (3):
The coefficient storage part 8 is a ROM (Read-Only Memory), for example, and previously stores values of the coefficients gi,j. The values of the coefficients gi,j are read out from the coefficient storage part 8 by the filter coefficient calculator 6.
The data entry part 7 is a keyboard, for example, and receives a value of the parameter x which is input by a user external to the weight measurement apparatus. The data entry part 7 then outputs the received value of the parameter x to the filter coefficient calculator 6.
Next, operations for measuring a weight of an object in the weight measurement apparatus according to the conventional art will be described with reference to a flow chart in
As illustrated in
Then, the filter coefficient calculator 6 substitutes the values of the coefficients gi,j and the initial value of the parameter x into the equation (2), to calculate one sequence {ai} of the filter coefficients and output it to the signal processor 5, in a step s3. As a result, a band position of an attenuation band in filtering characteristics exhibited in the signal processor 5 is set to an initial position specified by the parameter x. It is noted that the filter coefficients ai can be calculated promptly because the equation (2) for calculating the filter coefficients ai are expressed by a polynomial.
Thereafter, in a step s4, the signal processor 5 carries out a filtering process on the weighing signal Ds using the one sequence {ai} of the filter coefficients which has been calculated in the step s3. Further, the signal processor 5 outputs a result of the filtering process to the microcomputer, as the signal Xs, and the microcomputer displays the weight of the object on the display part such as a CRT.
Then, upon receipt of a new value of the parameter x input by a user of the weight measurement apparatus, the data entry part 7 outputs the received new value to the filter coefficient calculator 6 in a step s5.
As described above, change in type of an object or the like results in change in a natural frequency of the weight sensor 1 and thus change in frequency of a natural frequency noise contained in the weighing signal Ds. In this connection, a user of the weight measurement apparatus inputs a value of the parameter x specifying a position of a band including a new natural frequency after the change, in order to surely eliminate the natural frequency noise, in the step s5. For example, information about the natural frequency of the weight sensor 1 for each type of object under measurement is previously prepared, and the user inputs a value of the parameter x to the data entry part 7 while referring to the information, each time the type of the object is changed.
It is noted that though the structure described above is configured so as to require input of a value of the parameter x to the data entry part 7, the structure may alternatively be configured so as to allow a value of the parameter x to be automatically determined. For example, this alternative is possible in a weight measurement apparatus such as a weight checker in which a frequency which must be attenuated can be determined by determining a speed of a conveyor. Further alternatively, automatic determination of a value of the parameter x can be accomplished by carrying out frequency analysis by means of the FFT of a vibration waveform of the measurement signal or the like and then detecting a portion of the waveform which has the greatest amplitude. The structure may be configured so as to implement this procedure.
Turning back to the flow chart, subsequently to the step s5, the filter coefficient calculator 6 substitutes the new value of the parameter x which is received from the data entry part 7 into the equation (2), and changes the one sequence {ai} of the filter coefficients to output a new sequence {ai} to the signal processor 5, in a step s6. As a result, the attenuation band in the filtering characteristics exhibited in the signal processor 5 is moved from the initial band position to a band position specified by the new value of the parameter x. Then, in a step s7, the signal processor 5 carries out a filtering process using the new sequence {ai} of the filter coefficients obtained in the step s6, and outputs a result of the filtering process as the signal Xs.
If there is a need of changing again the position of the attenuation band, the user inputs a further new value of the parameter x to the data entry part 7. Then, the steps s6 and s7 are performed, so that the attenuation band is moved to a band position newly specified by the further new value of the parameter x.
As is made clear from the foregoing description, in the weight measurement apparatus according to the conventional art, the filter coefficients ai can be changed by using the parameter x specifying a band position of an attenuation band which is physical and thus easy to grasp. Accordingly, even when a frequency which must be attenuated in the signal processor 5 is changed due to change in the natural frequency of the weight sensor 1 or the like, it is possible to easily move the attenuation band by referring to information about a new frequency which must be attenuated. Therefore, a frequency of a noise in the weighing signal Ds, which is liable to be changed, can be filtered out easily and appropriately.
Moreover, as shown in the equation (2), the filter coefficients as are obtained by a predetermined arithmetic expression. This eliminates a need of preparing multistage filters which are required in the method of JP 6-21814 described in the Background section, and a need of previously storing filter coefficients representing different characteristics. Therefore, a scale of a circuit necessary for a filtering process can be reduced, which makes it possible to provide a low cost weight measurement apparatus to users.
Next, processes for determining values of the coefficients gi,j will be described. First, ideal amplitude characteristics M (ejω, φ), in other words, reference amplitude characteristics, and a weight function W (ejω, φ) of a FIR filter in which a band position of an attenuation band is variable are provided by the following equations (4) and (5):
In the equations (4) and (5), “ωp” represents a normalized angular frequency of an edge of a passband, “ωs” represents a normalized angular frequency of an edge of a stopband, “w” represents a width of an attenuation band, and “φ” represents a parameter controlling a band position of an attenuation band. Among those, a relationship ωs<φ<π−w is maintained.
According to the conventional art, an attenuation band in the reference amplitude characteristics extends over an angular frequency range (which will be hereinafter simply referred to as a “frequency range”) from φ to (φ+w), and a band position of the attenuation band is specified depending on a value of the parameter φ, as shown in the above equation (4). The band position of the attenuation band in the reference amplitude characteristics will hereinafter be referred to as a “reference band position” throughout the present specification.
Subsequently, an optimum filter is designed for each of values φk (k=0, 1, 2, . . . K) which is to be substituted for the parameter φ. A larger value of “k” indicates a large value φk. In the conventional art, the optimum filter is designed through successive projections method. Detailed description thereof will be made below.
Given that the filter coefficients as provided when the values φk are substituted for the parameter φ are filter coefficients ai,k, a frequency response H(ejω, φk) of a digital filter provided when each of the values φk is substituted for the parameter φ is expressed by the following equation (6):
Then, in order to obtain the filter coefficients ai,k through successive projections method, an error e(ω) found in an n-time calculation of repeated calculations is expressed by the following equation (7):
In the equation (7), “M(ω)” represents the reference amplitude characteristics M (ejω, φ). It is noted that a superscript “n” of the filter coefficients ai,k represents not an exponent, but the number of repetitions.
Now, given that a frequency at which specifications are most slightly met is “ωM” and a tolerance relative to the reference amplitude characteristics is “λ(ω)”, the following equation (8) is established:
Given that a tolerance obtained when the weight function W(ejω, φ) is equal to 1 is “δ”,the tolerance λ(ω) is expressed by the following equation (9):
λ(ω)=δ/W(ω) Equation (9)
In the equation (9), “W(ω)” represents the weight function “W(ejω, φ)”.
As shown in the equations (5) and (9), a tolerance relative to the attenuation band in the reference amplitude characteristics which is employed in designing the optimal filter is set to one-tenth of a tolerance relative to the other bands in the reference amplitude characteristics, depending on the weight function.
The filter coefficients are updated in successive projections method by using the following equation (10):
In the equation (10), “eM” is equal to “e(ωM)”.
The filter coefficients are repeatedly updated using the above equation (10) until they converge, in other words, until eM≦λ(ωM), to thereby obtain optimum filter coefficients ai,k.
In this manner, K sequences {ai, 0}, {ae,1}, . . . , {ai, K} of the filter coefficients ai,k are obtained based on respective reference amplitude characteristics which are obtained when φ0, φ1, . . . φk are substituted for the parameter 4), as well as respective values of the weight function which are obtained when φ0, φ1, . . . φk are substituted for the parameter φ. The optimum filter coefficients ai, k obtained based on the reference amplitude characteristics and the weight function will serve as reference filter coefficients ai,k′ (k=0, 1, 2, . . . K).
Next, least square approximation is carried out on the reference filter coefficients ai,k′ using an Mth order polynomial bi(x) in the equation (2), to determine values of the coefficients gi,j.
To this end, a value b0(φk) obtained when any of the values q k is substituted for the parameter x and the filter coefficients a0,k′ are dealt with, first. The following equation (11) is provided:
In order to carry out least square approximation on the reference filter coefficients ai,k′ using a polynomial bi(x), to calculate a vector B0=[g0, 0 g0, 1, . . . g0, M]T which allows “S” in the above equation (11) to be minimized is statistically preferable, as is well known. A specific procedure for the calculation is to solve simultaneous equations given by the following equation (12) which shows conditions for obtaining maximum and minimum values, for “g0, 0, g0, 1, . . . , g0, M”:
Then, expression of the equation (12) using normal equations is as follows:
A matrix X for the equation (12) is obtained based on the values φk, and a vector A0,k is obtained based on the reference filter coefficients ai,k′ which have been previously obtained through successive projections method. Accordingly, both “(XTX)” on the left side and “(XTA0,k)” on the right side of the equation (13) can be obtained, so that the vector B0 can be obtained.
A value b1(φk) and the reference filter coefficients a1,k′, a value b2(φk) and the reference filter coefficients a2, k′, . . . , and a value bN(φk) and the reference filter coefficients aN,k′ are dealt with by following the same procedures as described above, to obtain a vector Bi=[gi, 0 gi, 1 . . . gi, M]T.
According to the conventional art, values obtained in the foregoing manner are employed as values of the coefficients gi,j in the equation (2), to thereby allow the parameter x to specify a band position of an attenuation band.
Also, in the conventional art, when the reference amplitude characteristics is defined as expressed by the equation (4), a value of the parameter x that a user can input should be within a range from φ0 to φK, inclusive (φ0≦x≦φK). For example, if the user inputs the value φ0 as a value of the parameter x to the data entry part 7, a band position provided by a frequency range from φ0 to (φ0+w) is specified as a band position of the attenuation band. If the user inputs the value φK as a value of the parameter x to the data entry part 7, a band position provided by a frequency range from φK to (φK+w) is specified as a band position of the attenuation band.
As described above, the user can specify a band position of an attenuation band within a frequency range from a reference band position in the reference amplitude characteristics provided when φ=φ0 to another reference band position in the reference amplitude characteristics provided when φ=φK, by means of the parameter x. Also, by previously preparing a table establishing a correspondence between a value of the parameter x and a band position of an attenuation band, the user can easily specify a desired band position.
Additionally, the weight function W(ejω, φ) determines a weight of a tolerance used in designing the optimum filter for each frequency range, as described above. Accordingly, attenuation in the attenuation band in the filtering characteristics exhibited in the signal processor 5 is specified depending on a value of the weight function (ejω, φ) provided when a relationship φ≦|ω≦φ+w is maintained. In the conventional art, attenuation in the attenuation band which is provided by the signal processor 5 is set to ten times of attenuation in the other bands in the stopband, as shown in the equation (5).
Next, specific description will be made about how a band position of an attenuation band is changed on an axis of frequency depending on a value of the parameter x, by substituting specific numerical values for the coefficients gi,j.
First, conditions are laid down as follows, for example.
ωp=0.05 π Equation (16)
ωs=0.2 π Equation (17)
w=0.1 π Equation (18)
δ=0.042 Equation (19)
N=10 Equation (20)
Also, assume that φ is in a range from 0.3 π to 0.4 π, inclusive (0.3 π≦φ≦0.4 π) and that discrete values obtained by dividing the range into 11 equal parts correspond to the values φk(k=0,1, . . . ,10). Then, φ0 is 0.37 π(φ0=0.37 π), φ1 is 0.31 π(φ1=0.31 π), φ2 is 0.32 π(φ2=0.32 π), . . . , and φ10 is 0.4 π(φ10=0.4 π). Accordingly, a range of a value which can be substituted for the parameter x is 0.3 π≦x≦0.4 π.
Referring to
Next, the reference filter coefficients ai,k′ obtained under the above-noted conditions are approximated by a fifth order polynomial (M=5), to determine values of the coefficients gi,j, which are shown in
Referring to
It is appreciated from
As shown in
As is made clear from the foregoing description, in the weight measurement apparatus according to the conventional art, the filter coefficients ai can be changed by using the parameter x specifying a band position of an attenuation band which is physical and thus easy to grasp. Accordingly, it is possible to easily change a band position of the attenuation band. Therefore, a frequency of a noise in the weighing signal Ds, which is liable to be changed, can be filtered out easily and appropriately.
Additionally, the number of the values φk (k=0, 1, . . . , K) to be substituted for the parameter φ used in obtaining the coefficients gi,j is preferably three or more (K≧3) for the following reasons.
According to the conventional art, an attenuation band with a width extending along an axis of frequency is moved by using the parameter x. As such, it is desired to bring a width of the attenuation band close to an appropriate band width (the band width w in the equation (4)) not only in opposite ends of a frequency range within which the band position of the attenuation band can be specified by the parameter x (which will hereinafter be referred to as a “specified frequency range”), but also in a middle portion of the specified frequency range.
To this end, the number of the values φk is set to three or more. This results in the sequences {ai,k′} of the reference filter coefficients being calculated based on not only reference amplitude characteristics in the opposite ends of the specified frequency range, i.e., reference amplitude characteristics exhibited when φ=φ0 and φ=φk, but also reference characteristics in the middle portion thereof. The sequences {ai,k′} of the reference filter coefficients which have been calculated in that way is used in determining values of the coefficients gi,j in the equation (2). In other words, to set the number of the values φk to three or more would allow the equation (2) for the filter coefficients to be derived from not only the reference amplitude characteristics in the opposite ends of the specified frequency range, but also the reference amplitude characteristics in the middle portion thereof. This prevents a considerable difference between the appropriate band width w and the band width of the attenuation band in the middle portion of the specified frequency range, as well as between the appropriate band width w and the band width of the attenuation band in the opposite ends of the specified frequency range.
Moreover, though the above description in the conventional art has been made with respect to a weight measurement apparatus, the present invention can also be applied to a general method of designing a digital filter. Below, a brief description about a method of designing a digital filter in which a position of an attenuation band is variable will be made.
First, a plurality of sequences {ai,k′} of reference filter coefficients are calculated from reference amplitude characteristics in the same manner as described above. Subsequently, values of the coefficients gi,j are determined using the calculated sequences {ai,k′}, and the filter coefficients ai,k of the digital filter are approximated by the equation (2). Then, a value is substituted for the parameter x in the equation (2), to obtain one sequence {ai} of the filter coefficients of the digital filter.
In order to change the band position of the attenuation band in filtering characteristics, the value of the parameter x is changed to thereby change the filter coefficients. As a result, the attenuation band is moved to a new band position newly specified by the parameter x.
By employing the foregoing method of designing a digital filter, it is possible to easily move an attenuation band. Accordingly, even if a noise frequency is liable to be changed, it is possible to eliminate a noise easily and appropriately. Further, as the filter coefficients are obtained by an arithmetic expression, there is no need for forming the digital filter with multistage filters which are required in JP 6-21814. Therefore, a scale of a circuit of the digital filter can be reduced.
In the conventional art described above, only one attenuation band is variable in a stopband, as shown in the equation (5). Yet there may be cases where a big noise is caused by a plurality of causes, and the causes vary. Accordingly, the design of a filter will be described below in which a plurality of attenuation bands can be variably set using the conventional art method.
In this case, reference amplitude characteristics are expressed by the following equation (21) in a corresponding relationship to the equation (4):
Also, a weight function is expressed by the following equation (22) in a corresponding relationship to the equation (5):
In the equations (21) and (22), “φ1” and “φ2” represent spectrum parameters controlling band positions of the respective attenuation bands, and are given as the lowest limit values of normalized angular frequencies of the respective attenuation bands.
Given that the filter coefficients in φ1 and φ2 are filter coefficients ai, j, k, the following equation (23) is established:
Thus, a transfer function of the filter in which a plurality of bands are variable is expressed by the following equation (24):
In the conventional art, frequency parameters of a plurality of attenuation bands themselves are used in the course of design. Accordingly, when φ1=0.3, φ2=0.8, j=4, and k=4, then φ14=0.34=0.0081, and φ24=0.84=0.4096 in the equation (24). As such, φ14 takes on a very small value compared to φ24, so φ1 and φ2 cannot be approximated equally in designing the filter. As a result, desired attenuation cannot be obtained in the φ1 side band.
Therefore, the preferred embodiment according to the present invention is intended for the design of a filter in which desired attenuation can be obtained in each of a plurality of attenuation bands by approximating φ1 and φ2 equally in the course of design.
As shown in
In the equation (25), “ωp” represents a normalized angular frequency of an edge of a passband, “ωs” represents a normalized angular frequency of an edge of a stopband, “φ1, φ2, . . . φK” represent a center normalized angular frequency of each band where great stopband attenuation is required, and “τ1, τ2, . . . τK” represent a band width of each band where great stopband attenuation is required. Also, “δ1, δ2, . . . δK” represent a spectrum parameter, and is expressed by the following equation (26):
Additionally, a weight function is expressed by the following equation (27):
In the equation (27), “g1, g2, . . . gK” represent a weight of each band where great stopband attenuation is required, and takes on a positive real number value. As described above, the preferred embodiment according to the present invention is characterized in that each band is specified by a spectrum parameter not as the lowest limit value of a frequency as in the above-described conventional art, but as the amount of deviation from its center frequency (the amount of displacement from a center frequency in a range where each attenuation band should vary). Other than providing a spectrum parameter as the amount of deviation from a center frequency, the preferred embodiment is the same as the above-described conventional art. Detailed descriptions of the apparatus configuration and the like are thus omitted.
A frequency response of a transfer function of a 2Nth order linear phase FIR filter in which a plurality of stopbands are variable approximating characteristics having the above-mentioned desired characteristics and weight is expressed by the following equation (28) using the spectrum parameter:
In the equation (28), a value of h (i, δ1, δ2, . . . δK) changes as the spectrum parameter changes. Thus by extending the above-described conventional art, coefficients are approximated using an Li-th order polynomial for each spectrum parameter.
When φ1=0.3, φ2=0.8, δ1=0.2, δ2=0.2, 11=4, and 11=4 in the equation (29) where δ1 and δ2 are provided instead of φ1 and φ2 as parameters, δ14 and δ24 take on the same value of 0.0016. Accordingly, δ1 and δ2 can be approximated equally in designing the filter, which in turn allows the design of a desired filter.
For brevity, an example where K=2 will now be described.
An evaluation function where amplitude characteristics |H (ω, φ1, φ2, δ1, δ2)| of a transfer function by substituting the equation (29) into the equation (28) becomes optimum in terms of weighed least square between the reference amplitude characteristics in the equation (25) and the weight function in the equation (27) is provided by the following equation (30):
In the equation (30), optimum coefficients g (i, 11, 12) are calculated such that the evaluation function in the equation (30) becomes minimum. When the amount of variation in each spectrum parameter is divided into Mδ+1 equal parts, and a frequency area from 0 to 7 is divided into Mf+1 equal parts in the evaluation function in the equation (30), discrete evaluation functions are obtained as expressed by the following equation (31):
In order to minimize the discrete evaluation functions in the equation (31), coefficients g (p, q, r) are partially differentiated and assumed to be zero. The result is expressed by the following equation (32):
Note that the following equation (33) applies:
φ=(φ1, φ2)
δ=(δ1.m1, δ2.m2)
C(i, s, t, f)=δ1.m1sδ2.m2t cos(i ω f) (38)
The equations (32) and (33) are arranged as follows:
Then, p=0, 1, . . . N, q=0, 1, . . . L1, and r=0, 1, . . . ,L2 are substituted into the equation (34), and a multi-dimensional array for the spectrum parameters is transformed to a first-dimensional array. The result array is expressed by the following equation (35):
AWAtG=AWD (35)
Note that the following equations (36) to (39) apply:
In the above equations (36) to (39), “u”=(Mf+1)(Mδ+1)(M67 +1), and and “v”=(N+1)(L1+1)(L2+1). The “diag [•]” represents a diagonal matrix including elements in [•]. An i, j-th element a (i, j) in a matrix A is expressed by the following equation (40):
a(i,j)=δ1m.1l1δ2.m2l2 cos(k ωf) (40)
Note that the following equation (41) applies:
The “j” changes consecutively from 0 to (N+1)(L1+1)(L2+1) as indicated below, with its corresponding 11, j, 12, j changing as indicated below:
represents a maximum integral value that does not exceed “c”, and mod (a, b) represents the remainder obtained when “a” is divided by “b”.
In view of the foregoing, optimum coefficients are expressed by the following equation (44):
G=(AWAT)−1AWD (44)
Next, as a specific design example, specifications in which two stopbands each having large attenuation are variable are provided as the following table 1:
A passband is separated into 20 equal parts and the entire stopband is separated into 500 equal parts in this example. Also, the amounts of variation in angular frequency of great attenuation are separated at 0.05 intervals respectively. The result amplitude characteristics are shown in
The amplitude characteristics for an unseparated point of δ1=0.0 and δ2=0.01 are also shown in
For comparison purposes, an FIR filter was designed that has fixed coefficients with an unmoved stopband where the amount of great stopband attenuation is not less than at least −90 dB, assuming that from 0.27 π to 0.3 π is a weight “1”, and from 0.3 π to 0.9 π is a weight “10”. The result amplitude characteristics are shown in
While the design of a filter in which a plurality of stopbands are variable has been discussed above, the present invention is also applicable to the design of a filter in which one stopband is variable. Further, while the design of a low pass filter has been discussed above, the present invention is also applicable to the design of other filters than a low pass filter (such as a band path filter and a high pass filter). Still further, while the design of an FIR filter has been described, the present invention is also applicable to the design of an IIR filter.
While the invention has been shown and described in detail, the foregoing description is in all aspects illustrative and not restrictive. It is therefore understood that numerous modifications and variations can be devised without departing from the scope of the invention.
Number | Date | Country | Kind |
---|---|---|---|
JP2005-319313 | Nov 2005 | JP | national |