Instrumental error compensation circuit for flow meter
BACKGROUND OF THE INVENTION 
     The present invention relates to a circuit for compensating for instrumental errors of a flow meter. 
     In a flow meter, an instrumental error has to be compensated for by using a compensation coefficient or the like so that measurement of a flow rate of a fluid may give a true volume. 
     Supposing that an instrumental error is E, a displayed volume is Vi, a volume actually flown is Vq, and a compensation coefficient is (1+α), there holds an equation: ##EQU1## or 
     
         Vq=(1+α)·Vi                                 Eq. (2) 
    
     The instrumental error E, which is a function of the flow rate Q, cannot be reduced beyond a certain limit by a mechanical means but may be successfully reduced to a negligible value if use is made of an electronic means. The electronic means for such an application has heretofore been proposed in various forms. 
     One of the proposed electronic means is applied to a flow meter of the type wherein a pickup coil or the like senses rotations of a rotor which is rotated by a fluid flowing through the flow meter, the rotations being converted into electric pulses. The error reducing means is constructed to vary the pulse rate of detected pulses in order that an error curve may undergo a parallel shift within a certain range of flow rates Q to bring the errors closer to zero in an average sense. However, it is difficult for such a prior art implementation to approximate the errors to zero over the entire range of flow rates. 
     In light of this, there has been proposed a system in which a plurality of sections are defined within an operable range of a flow meter and a ROM or like memory stores error compensation amounts matched to the individual sections. The parallel shift of the error curve in this system occurs over a width which differs from one section to another. This system, however, suffers from the drawback that because a single compensation amount is assigned to each compensation section, the error reaches a critical value unless the range is fractionalized into a number of sections and, therefore, without a memory having a disproportionate capacity. 
     SUMMARY OF THE INVENTION 
     It is therefore an object of the present invention to provide an instrumental error compensation circuit for a flow meter which insures a desirable accuracy of compensation even though each compensation section may be wide, by calculating compensation amounts in different compensation sections in correspondence to flow rates by linear interpolation. 
     It is another object of the present invention to provide a generally improved instrumental error compensation circuit for a flow meter. 
     A circuit for compensating for an instrumental error of a flow meter which generates a pulse signal having a frequency proportional to a flow rate of the present invention includes a pulse distributor for generating two different pulse signals in response to the pulse signal output from the flow meter. The two pulse signals have a predetermined frequency ratio to each other. A flow rate calculator calculates an instantaneous flow rate based on the frequency of the output signal of the flow meter and generates an output signal indicative of the instantaneous flow rate. A flow rate section identifier identifies, in response to the output signal of the flow rate calculator specific one of predetermined flow rate sections to which the calculated instantaneous flow rate belongs, and generates a signal indicative of the identified section. A compensation constant memory stores in advance a plurality of compensation constants necessary for calculating an instrumental error of the flow meter for each of the sections, selects specific one of the compensation constants in response to the output signal of the identifier, and generates a signal indicative of the compensation constant. A compensation constant calculate and write circuit calculates a compensation coefficient in response to the output signal of the compensation constant memory by performing interpolation corresponding to a flow rate, and generates a signal indicative of the compensation coefficient. A compensation amount calculator calculates an amount of compensation corresponding to the output signal of the compensation constant calculate and write circuit in sychronism with one of the pulse signals output from the pulse distributor, and generates a signal indicative of the amount of compensation. An adder means adds up the output signals of the compensation amount calculator and, every time the sum reaches a predetermined numerical value, generates an overflow pulse signal as a compensated flow rate pulse. An output sync circuit synchronizes the output pulse signal of the adder to the other output signal of the pulse distributor to generate a sync signal. 
     In accordance with the present invention, an instrumental error compensation circuit for a flow meter is disclosed in which a flow rate obtained from one output signal of the flow meter is identified with respect to a plurality of predetermined sections of flow rates. Flow rate compensation coefficients are calculated by linear interpolation on the basis of actually measured data which are obtained in advance in accordance with instrumental errors of the flow meter. Actual flow rates of a fluid are measured with the instrumental errors of the flow meter compensated for by the calculated coefficients. 
     The above and other objects, features and advantages of the present invention will become apparent from the following detailed description taken with the accompanying drawings. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     FIG. 1 is a graph representing the principle of operation of an instrumental error compensation circuit in accordance with the present invention; 
     FIG. 2 is a block diagram of an instrumental error compensation circuit embodying the present invention; and FIG. 3 is a waveform diagram showing pulses which appear in various parts of the circuit shown in FIG. 2. 
    
    
     DESCRIPTION OF THE PREFERRED EMBODIMENTS 
     While the instrumental error compensation circuit for a flow meter of the present invention is susceptible of numerous physical embodiments, depending upon the environment and requirements of use, a substantial number of the herein shown and described embodiment have been made, tested and used, and all have performed in an eminently satisfactory manner. 
     Referring to FIG. 1 of the drawings, the graph shows flow rates Q along its abscissa and compensation coefficients (1+α) along its ordinate. A curve E represents a flow rate to compensation coefficient characteristic and may be represented by lines F 1 , F 2 , F 3  and F 4  in discrete compensation sections by approximation. 
     When a flow rate Q is calculated, specific one of the compensation sections i, ii, iii and iv to which the flow rate Q belongs is identified. Thereafter, based on data An and Bn which were computed in advance using instrumental errors of flow rates Q, a compensation coefficient is determined for the specific section by linear interpolation. That is, a compensation coefficient (1+α) is calculated in a section in which an instantaneous flow rate Q lies, using corresponding one of the equations: ##EQU2## 
     The calculated coefficient (1+α) is used for compensating for an error. The data An and Bn are obtained from actually measured instrumental errors by a method of least squares or like method of tolerance. 
     Reference will be made to FIGS. 2 and 3 for describing a practical construction and operation of the instrumental error compensation circuit of the present invention. 
     A flow meter 10 generates flow rate pulses having a frequency f which is proportional to a flow rate. The flow rate pulses are delivered to a flow rate calculator 12 and, via a low frequency output terminal 14a of a pulse distributor 14, to a compensation amount calculator 16. While pulses P appearing at the low frequency output terminal 14a of the pulse distributor 14 are common in frequency (f) to the incoming flow rate pulses, pulses Q appearing at the other or high frequency output terminal 14b have a frequency double the frequency f, 2f. 
     The flow rate calculator 12 includes a pulse period measuring circuit 12a for measuring a period of the flow rate pulse signal. The circuit 12a connects to a reciprocal calculator 12b which is adapted to obtain a reciprocal of the period of the pulse signal, i.e. a flow rate. The flow rate is fed from the calculator 12b to a flow rate section identifier circuit 18 which identifies specific one of the predetermined compensation sections to which the input flow rate belongs. 
     A compensation constant memory 20 which may be constituted by a ROM or like known memory stores compensation amount data which were calculated in advance for the individual flow rate sections on the basis of an instrumental error of the flow meter. In response to an output of the section identifier 18, the memory 20 produces a compensation value associated with the input and this value is loaded in the compensation amount calculator 16. Every time a pulse P is delivered from the terminal 14a of the pulse distributor 14 to the compensation amount calculator 16, the latter calculates a compensation value (1+α) based on the output data of the memory 20 and using corresponding one of the Eqs. (3-i) to (3-iv). The output of the calculator 16 is fed to an adder 22. The calculator 16 may be constituted by the circuit a shown in FIG. 1 of Japanese Utility Model Publication No. 51-9895. 
     The adder 22 adds up the sequential outputs of the compensation amount calculator 16 and, before the sum reaches &#34;1 (one)&#34;, delivers no pulses therefrom. Upon the increase of the sum to &#34;1&#34;, the adder 22 overflows to supply an output sync circuit 24 with a pulse. Describing it more concretely, pulses P having a frequency f proportioanl to a flow rate appear at the output terminal 14a of the pulse distributor 14, while pulses Q whose frequency is double the frequency of the pulses P appear at the output terminal 14b. Each time a pulse P appears, the calculator 16 provides a compensation value (1+α) in response to an output of the memory 20 and using one of the Eqs. (3-i) to (3-iv). The output of the calculator 16 is fed to the adder 22. The adder 22, every time a pulse P is produced, adds up an incoming compensation value (1+α). As soon as the sum increases to &#34;1&#34;, the adder 22 overflows and produces a numerical value  &#34;1&#34;. Upon the increase of the sum to &#34;2&#34;, the adder 22 will produce a numerical value &#34;2&#34;. 
     The output sync circuit 24 comprises an AND gate 24a and an up-down counter 24b. The AND gate 24a receives at one input terminal thereof the pulses Q which are output from the terminal 14b of the pulse distributor 14 with a frequency double the frequency of the pulses P. The up-down counter 24b receives at its addition input terminal the overflow pulses which are output from the adder 22. The output of the AND gate 24b is fed back to the other or subtraction input terminal of the up-down counter 24b. 
     Because a correction value (1+α) is integrated by the adder 22 for each output pulse of the flow meter 10, the pulses from the flow meter 10 and output pulses of the adder 22 are eventually N (1+α) pulses. While this provides compensated correct flow rate pulses as far as the number is concerned, a problem still exists concerning density of the pulses with respect to time. Thus, the output sync circuit 24 serves to set up synchronization for evenness. In detail, the outputs of the adder 22 are once accumulated in the up-down counter 24b and, as the count reaches &#34;1&#34;, the counter 24b makes its output logical &#34;1&#34; thereby providing an output which is synchronous with a pulse appearing at the terminal 14b of the pulse distributor 14. If the count of the counter 14b is &#34;0&#34;, the output thereof will be logical &#34;0&#34; so that no outputs are produced by the AND gate 24a. 
     In FIG. 3, I shows a train of pulses output from the flow meter 10, II a train of pulses appearing at the output terminal 14b of the pulse distributor 14, III numerical values output from the compensation amount calculator 16, IV a train of pulses output from the adder 22, and V a train of compensated pulses output from the output sync circuit 24. 
     Where |α|&lt;1, the adder 22 produces overflow pulses substantially one for each output pulse of the flow meter 10, as shown in FIG. 3. Where (1+α)&gt;1, the output of the adder 22 becomes &#34;2&#34; at the ratio of 1:α as shown in the left half of FIG. 3 and the output sync circuit 24 delivers one additional pulse. Further, if (1+α) &lt;1, one overflow pulse is lost at the same ratio and, as shown in the right half of FIG. 3, one of the outputs of the output sync circuit 22 is lost. 
     Data in the section identifier 18 and those in the memory 20 corresponding to outputs of the identifier 18 may be suitably entered through keys associated with a write circuit 26 via a temporary flow rate section and error storage 28, a compensation constant calculate and write circuit 30 which may be constituted by any known device. That is, when the keys are operated to enter actually measured error data for the respective flow rates, the data become stored in the temporary storage 28 whereupon the calculate and write circuit 30 calculates flow rate sections necessary to perform compensation with a predetermined accuracy and values An and Bn for each of the sections. The values provided by the circuit 30 are loaded in the section identifier 18. 
     In summary, it will be seen that the present invention provides an instrumental error compensation apparatus which is operable with accuracy and with wide compensation sections due to the compensation amounts which are calculated by interpolation for individaul flow rates. 
     Various modifications will become possible for those skilled in the art after receiving the teachings of the present disclosure without departing from the scope thereof. For example, the write circuit 26 with keys may be substituted for by a read only memory (ROM) which stores necessary data and is replacable with another. Concerning the ratio of the output frequencies at the output terminals 14a and 14b of the pulse distributor 14, the requisite is merely to make the pulses appearing at the terminal 14b higher in frequency than those appearing at the output terminal of the adder 22 and, hence, the ratio of 1:2 shown and described is not restrictive. For example, if the compensation amount (1+α) output from the calculator 16 is preselected to be smaller than one, the output ratio of the pulse distributor 14 may be 1:1; if the flow meter 10 oscillating pulses at a frequency proportional to a flow rate is conditioned to employ n pulses to represent a unit amount, another ratio may be selected in which case the output of the calculator 16 may be (1+α )/n. The adder 22 may comprise a preset counter. The sections of flow rates may be replaced by those of pulse periods or those of frequencies, if desired. Furthermore, the illustrated constructions such as one of the output sync circuit 24 may be suitably modified within the scope of the invention.