Abstract:
A digital filter for filtering a weight indicative signal provided by a weighing device to remove undesirable oscillatory components caused by mechanical vibration of the weighing device. The filter has a plurality of notch frequencies in its transfer characteristic within and/or near the frequency range including such undesirable oscillatory components. The filter utilizes a transfer function of multiplex progressing averages of a series of sample values extracted from the weight signal.

Description:
BACKGROUND OF INVENTION 
     This invention relates to a device and a method for filtering a weight indicative electric signal (hereinunder referred to as &#34;weight signal&#34;) to remove undesirable components therefrom. More specifically, this invention relates to a device and a method for enabling removal of oscillatory components attributable to external forced vibration from the ground or floor in addition to conventional undampered inherent oscillatory components attributitable to the structure of the weigher. 
     The weight signal produced from a weighing device such as a strain gauge load cell or force balance generally includes various undesirable components attributable to inherent vibration of the device, loading shock and the like in addition to a d.c. component indicative of the true weight of product to be weighed. The frequency characteristic of such weigher has a shape as shown in FIG. 1(a) and a peak frequency indicative of a feature of the inherent vibration is a frequency band 1 the in unloaded condition, while it is shifted to a lower frequency band 2 in loaded condition. In order to remove these undesirable components, therefore, three frequency ranges a, b and c may be provided as shown with reference to this frequency distribution to filter the weight signal by a filtering device having a frequency-versus-attenuation characteristic as shown in FIG.1(b). A skillful filtering system which enables this proceeding has been disclosed in the Japanese patent opening gazette No. 62-280625 and the Australian patent No. 578,181 of the same applicant as this application and the U.S. Pat. No. 4,817,026 assigned to this applicant. In this system, as shown in FIG. 2, an analog weight signal from a weigher 3 is amplified by an amplifier 4, filtered by an analog filter 5 and then supplied to a sample-and-hold circuit 6 to be sampled therein at a predetermined sampling frequency. A series of sampled weight signal output are digitized by an analog-to-digital (A/D) converter 7 and supplied to an arithmetic circuit 8. The analog filter 5 is adapted to previously remove noises relating to the sampling frequency (above a half of the sampling frequency). The following operation is applied to a series of input digital weight values D 1 , D 2 , D 3  , . . . in the arithmetic circuit 8. 
     As shown in FIG. 3, the successive weight values D 1  to D n1  (D 1  to D 10  in FIG. 3) are averaged and the resultant average is indicated as  1  M 1 . Next, the successive weight values D 2  to D n1+1  (D 2  to D 11  in FIG. 3) are averaged and the resultant average is indicated as  1  M 2 . A similar averaging operation is repeated to obtain a time-series of averages  1  M 1 ,  1  M 2 ,  1  M 3  , . . . as shown in FIG. 3. Such series of averages are referred to as &#34;moving (or progressive) averages of the first order&#34; and the number n 1  (10 in FIG. 3) is referred to as their &#34;averaging number&#34;. Next, the successive averages  1  M 1  to  1  Mn 2  ( 1  M 1  to  1  M 11  in FIG. 3),  1  M 2  to  1  M n2+1  ( 1  M 2  to  1  M 12  in FIG. 3) and so on are sequentially averaged to obtain a second time-series of averages  2  M 1 ,  2  M 2 ,  2  M 3  , . . . as shown. This series of averages are referred to as &#34;moving (or progressive) averages of the second order&#34; and the number n 2  (11 in FIG. 3) is referred to as their &#34;averaging number&#34;. By repeating a similar operation, moving averages  r  M i  (i=1,2,3 , . . .) of r-th order having the averaging number n r  can be calculated successively. Such operation is referred to as &#34;multiplexing of moving (or progressive) averages&#34;. 
     As well known in the field of digital filters, the transfer function of the moving averages of the first order is expressed by the following equation. ##EQU1## 
     The former part of this equation is representative of the amplitude characteristic and the latter exponential part thereof is representative of the phase delay. In the equation (1), T denotes the sampling interval or period and ω equals 2πf, where f denotes the oscillation frequency. The amplitude characteristic is therefore rewritten as follows, ##EQU2## where φ=n 1  πTf. Accordingly, the amplitude becomes zero and when φ equals Nπ, where N is a positive integer excluding zero. Therefore, if f n1  =1/n 1  T, the zero amplitude occurs at frequencies Nf n1 . This feature is shown in FIG. 4 where the averaging number is assumed as ten (10). The frequencies Nf n1  (N=1,2 , . . . ) are referred to as &#34;notch frequencies&#34;. Thus, it is understood that the moving average operation executed by the arithmetic circuit 8 functions as a filter having an attenuation band above about a half of frequency f n1  and notch frequencies representative of the zero amplitude appearing at integral multiples of f n1 . 
     Similarly, the amplitude characteristic of the moving averages of the third order is expressed by the following equation. ##EQU3## This characteristic is shown in FIG. 5 where n 1  =10, n 2  =11 and n 3  =12. In the drawing, the three notches of fn 3 , f n2  and f n1  exhibiting attenuation above 70 dB correspond to the frequency range b of FIGS. 1(a) and (b) and the range above 20 Hz exhibiting attenuation of at least about 40 dB corresponds to the frequency range c. The attenuation degrades with decrease of the frequency in the transition range below 16Hz corresponding to the frequency range a. As described above, the resonance components of inherent vibration of the weigher and various undesirable components attributable to shock and the like including frequency components above the intermediate portion of the range a can be filtered out substantially completely by suitably selecting the order number r and the averaging number n 1 , n 2  , . . . in accordance with the above-cited prior art system. 
     The object of removal in the prior art is the inherent oscillatory components within the frequency range of about 20 Hz to 50 Hz which is attributable to the structure of the weighing device itself, while this frequency range was thereafter found to be better revised as 15 Hz to 50 Hz. However, it has been found that, in a highly accurate and sensitive weighing device, especially, in case of using a weighing unit having a relatively large tare mass, some of the oscillatory components attributable to external forced vibration acting on the device from the ground or floor have very low frequencies, such as 3 to 8 Hz. Such components may be insufficiently filtered which causes a problem when they are too much. While the strength of such oscillatory components of very low frequency necessarily varies with the external condition, addition of a separate filter effective to this frequency range will result in a problem of degradation of signal response and consequent reduction of weighing power of the weigher. 
     Accordingly, an object of this invention is to provide improved device and method for filtering a weight signal, which enables to change the attenuation in accordance with the external condition to remove the above-mentioned very low frequency components in the frequency region a of FIG. 1(b) as maintaining the frequency band having the attenuation characteristic of the prior art as shown in the same drawing. 
     SUMMARY OF INVENTION 
     According to this invention, there is provided a device for filtering a weight signal of a weighing device, having in a first frequency range an attenuation band for attenuating undesirable components including oscillatory components determined by the weighing range of the weighing device or strong resonance components caused by the weighing device and, further, in a second frequency range lower than the first frequency range an oscillatory component attributable to the external vibration. The device comprises means for sampling the weight signal to provide a series of sample signals and arithmetic means for arithmetically processing the sample signals according to a transfer characteristic and the transfer characteristic corresponds to a transfer function of multiplexed moving averages of the sample signals. The arithmetic means includes means for selecting the averaging numbers of the respective orders of the moving averages to provide a plurality of notch frequencies within near the first frequency range and, as a feature of this invention, means for changing the averaging number corresponding to at least one of the orders of the moving averages to produce a plurality i of notch frequencies separate from those in the first frequency range within and near the second frequency range. 
     The means for changing the averaging number may be a selective input device which, for example, stores several predetermined averaging numbers and reads one of them in accordance with selection of the operator to supply it to the arithmetic means. The arithmetic means may be a computer as disclosed in the above-cited prior art and a digital filter including a variable coefficient multiplier and affecting an operation equivalent to the above-mentioned moving average multiplexing operation. These and other objects and features of this invention will be described in more detail below with reference to the accompanying drawings. 
    
    
     BRIEF DESCRIPTION OF DRAWINGS 
     In the drawings: 
     FIGS. 1(a) and (b) are explanatory diagrams of the principle of the prior art filtering system on which this invention is based; 
     FIG. 2 is a block diagram representing a configuration of the prior art filtering system; 
     FIG. 3 is a diagram representing a scheme of the moving average multiplexing operation; 
     FIG. 4 is a diagram representing an example of the transfer function of moving averages; 
     FIG. 5 is a diagram representing an example of the filtering characteristic of the prior art filtering system; 
     FIG. 6 is an explanatory diagram of the principle of the filtering system according to this invention; 
     FIG. 7 is a block diagram representing a configuration of the filtering device according to this invention; 
     FIG. 8 is a block diagram representing a first embodiment of the filtering device according to this invention; 
     FIGS. 9 and 10 are explanatory diagrams of the filtering characteristic of the filtering device according to this invention; 
     FIG. 11 is a block diagram representing a general configuration of a second embodiment of the filtering device according to this invention; 
     FIGS. 12 and 13 are block diagrams representing circuit configuration of the second embodiment; 
     FIG. 14 is a block diagram representing an alternative modification of the circuit of FIG. 12; 
     FIG. 15 is a block diagram representing an alter native modification of the circuit of FIG. 13; and 
     FIG. 16 is a block diagram representing a circuit configuration of a third embodiment of the filtering device according to this invention. 
    
    
     Throughout the drawings, same reference numerals are given to corresponding structural components. 
     DESCRIPTION OF PREFERRED EMBODIMENTS 
     The principle of the above-mentioned device of this invention is to selectively change the inclination of the attenuation in the low frequency range a of the filtering characteristic of FIG. 1(b) as shown by A, A&#39; and A&#34;in FIG. 6, thereby expanding the filtering range as shown by a, a&#39; and a&#34;in FIG. 6, while maintaining the attenuation in the higher frequency ranges b and c as shown in FIG. 6. In the device of this invention, therefore, the arithmetic circuit 8 of the prior art device of FIG. 2 is provided with a mode selector device 9 which, is enabled to selectively change the averaging number of the moving average multiplexing operation in at least one of the orders thereof as shown in FIG. 7. In the following embodiments, it is assumed, as an example, that the moving averages of weight samples at a sampling frequency T=1/155 second are calculated to the fourth order and that the value of the averaging number n 1  of the first order can be specified arbitrarily among four values 14, 21, 28 and 35 and the averaging numbers n 2 , n.sub. 3 and n 4  of the second, third and fourth orders are fixed to 8, 9 and 10, respectively. 
     Assuming now that the sample data as D 1 , D 2  , . . . D i , . . . , the moving averages of n 1  of them (first order) as  1  M 1 ,  1  M 2  , . . .  1  M i  , . . . , the moving averages of n 2  of them (third order) as  3  M 1 ,  3  M 2  , . . .  3  M i  , . . . and the moving averages of n 4  of them (fourth order) as  4  M 1 ,  4  M 2  , . . .  4  M i  , . . . then, the following relation is obtained among the averages of respective orders: ##EQU4## While the left side of the equation 4d,  4  M i+1 , becomes the filtered output, a configuration of the arithmetic circuit for affecting these operation is shown in FIG. 8. In the drawing, 10, 11, 12 and 13 denotes shift registers having n 1 , n 2 , n 3  and n 4  stages, respectively, and 14 denotes a shift register of a single stage. As n 1  is variable as described above, the number of stages of the shift register 10 is made 35, the maximum of n 1 , and the taps of the 14th, 21st, 28th and 35th stages (generalized by D i-n1+1  in the drawing) can be arbitrarily selected by the mode (n 1 ) selector 9. 15, 16, 17 and 18 denote arithmetic units for affecting the operations of the equations 4a, 4b, 4c and 4d, respectively. A series of sample data D i+1  are applied to the first shift register 10 and successively shifted rightwards. Then, the earliest sample data D i-  n1+1 is supplied to the arithmetic unit 15 from the specified n 1  -th stage. The arithmetic unit 15 is also supplied with the current sample data D i+1  of the shift register 10 and the output  1  M i  of the first stage of the second shift register 11 to calculate the moving averages  1  M i+1  from these inputs. The calculated moving averages  1  M i+1  are input to the second shift register 11 as new data. The second arithmetic unit 16 also calculates  2  M i+1 , the moving average of the second order, from  1  M i+1 , the calculated moving average,  1  M i-n2+1 , the earliest data from the second shift register 11 and  2  M i , output of the first stage of the third shift register 12. It is understood that th shift registers for the respective orders and the corresponding arithmetic units repeat thereafter a similar operation and finally calculate  4  M i+1 , the moving average of the fourth order 
     The frequency transfer function H according to the above operation is given by the following equation: 
     
         H(jω)=H.sub.1 (jω)×H.sub.234 (jω)  (5) 
    
     where H 1  is the frequency transfer function of the moving averages of the averaging number n 1  and H 234  is the frequency transfer function of the moving averages of the third order of the averaging numbers n 2 , n 3  and n 4 . They are expressed as follows with reference to the equations 1 and 3: ##EQU5## The amplitude characteristic of the above equations H is shown in FIG. 9 where n 1  is 14 and 28. As shown in the drawing, a plurality of notch frequencies are produced within the range b. More particularly, the notch frequencies f 2 , f 3  and f 4  produced by the averaging numbers n 2 , n 3  and n 4  are always fixed regardless of the value of the averaging number n 1 . In addition, when n 1  =14, one notch frequency f 1  appears in the range a and another notch frequency 2f 1  which is in the second order of f 1  appears in the range b. Accordingly, four notch frequencies 2f 1 , f 2 , f 3  and f 4  in total appear in the range b. When n 1  =28, a notch frequency f 1  &#39; and its second order notch frequency 2f 1  &#39; appear in the range a and its third and fourth order notch frequencies 3f 1  &#39;  and 4f 1  &#39; appear in the range b. In this case, therefore, five notch frequencies 3f 1  &#39;, 4f 1  &#39;, f 2 , f 3  and f 4  in total appear in the range b, thereby providing the range b with stronger attenuation as compared with the case where n 1  =14. Though not shown in the drawing, two (i.e., first and second order) notch frequencies appear in the range a and one third order notch frequency and three notch frequencies f 2 , f 3  and f 4  (i.e., four in total) appear in the range b when n 1  =21, three (i.e., first, second and third order) notch frequencies appear in the range a and three notch frequencies f 2 , f 3  and f 4  and two other (i.e., fourth and fifth order) notch frequencies (i.e., five in total) appear in the range b when n 1  =35. In other words, the attenuation in the range b is substantially increased when n 1  =21, 28 or 35 as compared with the case when n 1  =14 in this embodiment, and the increased attenuation is ensured in the range b for all of these averaging numbers. FIG. 10 shows the low frequency region of this frequency characteristic with respect to four values of n 1 . It is well understood therefrom that t e number of notch frequencies in the low frequency region increases in the valves with increase of n 1 , thereby increasing the attenuation and expanding the attenuation band toward the much lower frequency region. Even if any of the four values of n 1  is selected, the attenuation is maintained above 75.8 dB over 15.5 Hz to 22.14 Hz in the range b and also above 59 dB even in the range c, though the characteristics corresponding to n 1  =21 and n 1  =35 are not shown in FIG. 9. The frequency transfer functions of the equations 5, 6 and 7 can be transformed into time region and expressed in pulse transfer functions as follows: ##EQU6## The equation 10 is expanded about Z as follows: ##EQU7## where b 1 , b 2  , . . . are weighting coefficients. These equations are equivalent to known finite impulse response (FIR) filters and, therefore, arithmetic operation of each transfer function can be affected substantially by a digital filter. In this case, the decay of response due to multiplexed averaging operation is determined by the number of order of the highest order of Z and the sampling interval T as shown by the equation 1&#39;. It is calculated as follows in this example: 
     
         (n.sub.1 +n.sub.2 +n.sub.3 +n.sub.4 &#34;4)T=(14, 21, 28, 35+8+9+10-4)/155 =0.239, 0.284, 0.329 or 0.374 sec. 
    
     As shown in FIG. 1 , the operation of the equation 10 can be realized by constituting the arithmetic circuit 8 of FIG. 7 with an averaging number selectable non-recursive filter 19 for the operation of the equation 8&#39; and an averaging number fixed non-recursive filter 20 for the operation of the equation 9&#39;. Hereinunder, the digital sample input and output of the former stage filter 19 will be expressed respectively as f(n) and x(n) and the filtered output of the latter stage filter 20 will be expressed as y(n). 
     FIG. 12 shows an example of the non-recursive filter 19 in the former stage. In this example, thirty four (34) delay elements 21, -2134 are connected in series and respective delayed outputs are supplied to a summer circuit 22 together with the original input P(n) as shown. In this case, the outputs of the fourteenth to twentieth stages, the outputs of the twenty-first to twenty-seventh stages and the outputs of the twenty-eights to thirty-fourth stages are supplied through gates 23, 24 and 25, respectively. The output of the summer 22 is applied to a coefficient multiplier 26 and multiplied by a coefficient equal to 1/n 1  to complete the operation of the equation 8&#39;. While the coefficient of the coefficient multiplier 26 is selected by the mode selector 9, the selector 9 is adapted also to control the gates 23, 24 and 25 at the same time in accordance with the following Table I. In Table I, the binary code &#34;1&#34; indicates a closed circuit and the binary code &#34;0&#34; indicates an open circuit. 
     
                       TABLE I______________________________________MODE     n1    GATE 23     GATE 24 GATE 25______________________________________1        14    0           0       02        21    1           0       03        28    1           1       04        35    1           1       1______________________________________ 
    
     By comparing Table I with FIG. 12, it is understood that the arithmetic operation of the equation 8&#39; is adequately executed with each value of n 1 . 
     FIG. 13 shows an example of the non-recursive filter 20 in the latter stage The filter 20 includes twenty four (24) delay elements connected in series and its input and the outputs of the respective stages are supplied to a summer 29 through twenty five (25) coefficient multipliers 28 0 , 28 1  , . . . 28 24 , respectively, as shown. Each multiplier is adapted to store a coefficient as shown and multiplies thereby its input. It is readily understood that the operation of the equation 9&#39; is affected by this circuit. Thus, the output y(n) of the summer 29 becomes the output of the filtering device of this invention. 
     A modification of the non-recursive filter 19 of FIG. 12 is shown in FIG. 14. Here, a delay element 30 of the fourteenth order and three delay elements 31, 32 and 33 of the seventh order are connected in series instead of the thirty four delay elements 21 of the first order. The outputs of the respective elements are supplied to an inverter 39 through four terminals 35, 36, 37 and 38 of a switch 34. The inverter 39 is adapted to multiply the input by -1 (to invert its phase) and supplies the result to an adder 40 to add to the original input f(n). A non-recursive filter is constituted with these components. The sum output of the adder 40 is supplied to a coefficient multiplier 26 which is similar to that of FIG. 12 and multiplied by a coefficient equal to 1/n 1 . The mode selector 9 is adapted to change the coefficient 1/n, of the coefficient multiplier 26 by changing the divisor to 14, 21, 28 or 35 and also turn the switch 34 to corresponding one of the terminals 35, 36, 37 and 38 in accordance with the operator&#39;s selection. The output of the coefficient multiplier 26 is supplied to a recursive filter composed of an adder 41 and a delay element 42 of the first order. Putting A=1-Z -1 , B=1/n 1  and C=1/(1-Z -1 ) in the equation 8, then H(Z)=ABC and it is understood that three equations of A, B and C are operated respectively by three dashed blocks A, B and C of FIG. 14. It is also understood that the output of the recursive filter C is the filtered output x(n). 
     Similarly, the equation 9&#39; can be operated by a non-recursive/recursive filter of FIG. 15 instead of the non-recursive filter of FIG. 13. This filter is composed of three blocks of the same configuration and each block consists of a non-recursive section comprising delay element 44 of the n 2  -th, n 3  -th or n 4  -th order, an inverter 45, and an adder 46, a recursive section comprising elements 47 and 48 respectively corresponding to the elements 41 and 42 of FIG. 14 and an intervening coefficient multiplier 50 having a coefficient 1/n 2 , 1/n 3  or 1/n 4 . It is understood that the operations of the respective blocks correspond respectively to three factors (1-Z -n )/n(1-Z -1 ) where n equals n 2 , n 3  and n 4 . 
     Putting in the equation 10&#39; as 
     
         n.sub.1 +n.sub.2 +n.sub.3 +n.sub.4 -4=m-1                  (11) 
    
     and ##EQU8## the equation can be rewritten as follows: 
     
         H(Z)=K.sub.0 +k.sub.1 Z.sup.-1 +K.sub.2 Z.sup.-2 +. . . +K.sub.m-1 Z.sup.-(m-1)                                              (13) 
    
     All the coefficients K 0 , K 1 , K 2  , . . . of the equation 13 can be calculated from the equations 12. FIG. 16 shows a further embodiment of the arithmetic circuit 8 of this invention which is based upon this principle. This device includes m-1 number (58 in this case) of serially connected delay elements 51 of the first order, m number of multipliers for processing the original input and the outputs of the respective delay elements and a summer 53 for summing the outputs of all multipliers 52 and a mode selector 9 is adapted to supply the coefficients K 0 , K 1 , K 2  , . . . to the respective multipliers 52. The mode selector 9 stores a list of four sets of the K values (the coefficients K 0 , K 1 , K 2  , . . . ) previously calculated for each of the n 1  values 14, 21, 28 and 35. When the operator specifies the n 1  value, supplies the mode selector 4 a corresponding set of K values to the respective multipliers 52. It is apparent that the equation 13 is operated by this device. 
     The above embodiment have been presented for illustrative purpose only and never mean any limitation of the invention thereto. It is apparent to those skilled in the art that various modifications and variations can be made within the spirit and scope of this invention as defined in the appended claims. For example, while the above embodiments use moving averages to the fourth order and have the averaging number n 1  of the first order made variable, it is possible to use moving averages to any order and have the averaging number of any order or orders made variable. For example, it has been found that the attenuation can be further improved in the very low frequency range if the averaging number n 2  of the second order is doubled. It is also apparent that an equivalent operation can be affected by a computer or microprocessor instead of the digital filters in the above embodiments. Such operations can be affected also by multiplier/accumulators of Analog Device Co. and the like, for example.