JPH0443653Y2 - - Google Patents

Info

Publication number
JPH0443653Y2
JPH0443653Y2 JP13650486U JP13650486U JPH0443653Y2 JP H0443653 Y2 JPH0443653 Y2 JP H0443653Y2 JP 13650486 U JP13650486 U JP 13650486U JP 13650486 U JP13650486 U JP 13650486U JP H0443653 Y2 JPH0443653 Y2 JP H0443653Y2
Authority
JP
Japan
Prior art keywords
resistor
control
solenoid valve
circuit
drive coil
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired
Application number
JP13650486U
Other languages
Japanese (ja)
Other versions
JPS6342987U (en
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed filed Critical
Priority to JP13650486U priority Critical patent/JPH0443653Y2/ja
Publication of JPS6342987U publication Critical patent/JPS6342987U/ja
Application granted granted Critical
Publication of JPH0443653Y2 publication Critical patent/JPH0443653Y2/ja
Expired legal-status Critical Current

Links

Landscapes

  • Magnetically Actuated Valves (AREA)

Description

【考案の詳細な説明】 〔産業上の利用分野〕 本考案は、油圧や空気圧等の流量制御を行う電
磁弁の制御電流検出回路に関し、特にマイクロプ
ロセツサの制御のもとに油圧や空気圧系統の制御
を行う制御機構の制御電流の検出に関する。この
考案は自動車におけるクラツチ制御に適する。
[Detailed description of the invention] [Field of industrial application] The present invention relates to a control current detection circuit for a solenoid valve that controls the flow rate of oil pressure, air pressure, etc. The present invention relates to detection of a control current of a control mechanism that performs control. This idea is suitable for clutch control in automobiles.

〔概要〕〔overview〕

本考案は電磁弁の駆動コイルに直列に挿入され
た抵抗器に発生する電圧を検出して制御電流値を
検出する電磁弁の制御電流検出回路において、 駆動コイルに逆流防止ダイオードを介して並列
に第二の抵抗器を設け、この第二の抵抗器に発生
する電圧を検出して、その検出出力を駆動コイル
に直列に挿入された抵抗器に発生する電圧の検出
出力に加算することにより、 駆動コイルのインダクタンスに起因する制御電
流の検出誤差を補償し、制御誤差を少なくするも
のである。
This invention is a control current detection circuit for a solenoid valve that detects the control current value by detecting the voltage generated in a resistor inserted in series with the drive coil of the solenoid valve. By providing a second resistor, detecting the voltage generated in the second resistor, and adding the detected output to the detected output of the voltage generated in the resistor inserted in series with the drive coil, This compensates for the control current detection error caused by the inductance of the drive coil and reduces the control error.

〔従来の技術〕[Conventional technology]

油圧等の流体を用いた制御機構では油圧ポンプ
からの作動油を電磁弁で開閉制御を行い、その開
閉制御で作動油の通過流量を制御して油圧シリン
ダを制御する機構となつている。
In a control mechanism using a fluid such as hydraulic pressure, a solenoid valve controls the opening and closing of hydraulic oil from a hydraulic pump, and the opening/closing control controls the flow rate of the hydraulic oil to control a hydraulic cylinder.

空気圧による制御においても同様なものとなつ
ているので、以下では油圧制御を例にとつて説明
する。
The same applies to control using pneumatic pressure, so hydraulic control will be described below as an example.

この流体制御をマイクロプロセツサによる自動
車のクラツチの制御に適用しようとするとき、発
進時のクラツチ制御ではエンジンの回転数と車速
の情報を取り込んでクラツチを徐々につないでい
く必要がある。この場合、クラツチを徐々につな
いでいくには、電磁弁を断続的に開閉して作動油
の必要な流量を制御していく。このときの流量は
電磁弁を開閉する制御パルスのデユーテイ比で定
まる。
When this fluid control is applied to the control of an automobile's clutch by a microprocessor, it is necessary to gradually engage the clutch by taking in information about the engine speed and vehicle speed for clutch control at the time of starting. In this case, to gradually engage the clutch, a solenoid valve is opened and closed intermittently to control the required flow rate of hydraulic fluid. The flow rate at this time is determined by the duty ratio of the control pulses that open and close the solenoid valve.

ところで、この電磁弁の開閉による作動油の制
御量は、電磁弁の制御電流値により求められるか
ら、この制御電流値はマイクロプロセツサに入力
されて被制御値として処理される。
By the way, since the control amount of the hydraulic oil due to the opening and closing of this solenoid valve is determined by the control current value of the solenoid valve, this control current value is input to the microprocessor and processed as a controlled value.

この被制御値を計測するものとして、電磁弁の
制御電流検出回路がある。その制御電流検出回路
の構成を第2図に示す。
A control current detection circuit for a solenoid valve is used to measure this controlled value. The configuration of the control current detection circuit is shown in FIG.

電磁弁駆動コイルLの一方は駆動電源に接続さ
れ、他方はトランジスタTrに接続されており、
トランジスタTrのエミツタに抵抗R1が直列に接
続され抵抗R1の一端は接地されている。抵抗R1
とトランジスタTrとの接続点は抵抗R2を介して
演算増幅器OPの非反転入力に接続されており、
演算増幅器OPの出力は抵抗R5とコンデンサCに
より構成された平滑回路を介して図外のアナロ
グ・デイジタル変換器に導かれる。
One side of the electromagnetic valve drive coil L is connected to the drive power source, and the other side is connected to the transistor T r ,
A resistor R1 is connected in series to the emitter of the transistor Tr , and one end of the resistor R1 is grounded. Resistance R 1
The connection point between and the transistor T r is connected to the non-inverting input of the operational amplifier OP via the resistor R 2 .
The output of the operational amplifier OP is led to an analog-to-digital converter (not shown) via a smoothing circuit composed of a resistor R5 and a capacitor C.

この従来の回路の動作は、制御入力端子からの
制御入力パルスにより、トランジスタTrはオン
オフを行い、その結果駆動コイルLの電流が制御
される。トランジスタTrのオンオフ制御により、
抵抗R1には断続的に電流が流れ、この抵抗R1
両端には、電圧が生ずる。この電圧値は演算増幅
器OPにより増幅され、アナログ・デイジタル変
換器でデイジタル値に変換されて制御電流入力と
してマイクロプロセツサに取り込まれる。
In the operation of this conventional circuit, the transistor T r is turned on and off by a control input pulse from a control input terminal, and as a result, the current of the drive coil L is controlled. By on/off control of transistor T r ,
Current flows intermittently through the resistor R1 , and a voltage is generated across the resistor R1 . This voltage value is amplified by an operational amplifier OP, converted to a digital value by an analog-to-digital converter, and taken into the microprocessor as a control current input.

〔考案の解決しようとする問題点〕[Problem that the invention attempts to solve]

ところで、駆動コイルに流れる電流は、駆動コ
イルのインダクタンスにより、電磁エネルギーが
蓄積されるので、第3図aの制御パルス電圧波形
に対して、その応答電流波形は、第3図bに示す
波形図となる。
By the way, since electromagnetic energy is accumulated in the current flowing through the drive coil due to the inductance of the drive coil, the response current waveform to the control pulse voltage waveform shown in Fig. 3a is the waveform diagram shown in Fig. 3b. becomes.

ところが、この従来の回路例では、トランジス
タTrがオンオフを行う結果、抵抗R1にはトラン
ジスタTrがオンの時のみ制御電流が流れるため、
抵抗R1の両端には第3図bに示す斜線の部分の
電流は現れず、そのオフ時の制御電流を計測する
ことができない。
However, in this conventional circuit example, as a result of the transistor T r turning on and off, the control current flows through the resistor R 1 only when the transistor T r is on.
The current shown in the shaded area shown in FIG. 3b does not appear at both ends of the resistor R1 , and the control current when it is off cannot be measured.

すなわち、電磁弁の開閉は、第3図bの一点鎖
線で表された電流の値で行われるので、実際の電
磁弁はt1の時間開いている。ところが、従来の回
路では、制御パルスがオフになると、その後の制
御電流は取り込まれないので、制御電流をt2の時
間しか計測しておらず、実際の電磁弁の動作とは
t1−t2の時間分の誤差が生じていることになる。
That is, since the opening and closing of the solenoid valve is performed at the current value indicated by the dashed-dotted line in FIG. 3b, the actual solenoid valve is open for the time t1 . However, in the conventional circuit, once the control pulse is turned off, the subsequent control current is not taken in, so the control current is only measured for the time t 2 , which is different from the actual operation of the solenoid valve.
This means that an error for the time t 1t 2 has occurred.

このため、従来の制御電流検出回路では、より
正確な制御電流すなわち被制御値を求めることが
できなかつたので、制御誤差が生ずる欠点があつ
た。
For this reason, in the conventional control current detection circuit, it was not possible to obtain a more accurate control current, that is, a controlled value, and this resulted in a drawback that a control error occurred.

本考案は、従来の検出回路より、より正確な制
御電流を検出できる電磁弁の制御電流検出回路を
提供することを目的とする。
An object of the present invention is to provide a control current detection circuit for a solenoid valve that can detect a control current more accurately than conventional detection circuits.

〔問題点を解決するための手段〕[Means for solving problems]

本考案の制御電流検出回路は、開閉を一定周期
で繰り返しその周期に対する開デユーテイ比によ
り流体の通過量が制御される電磁弁の駆動コイル
に直列に挿入された第一の抵抗器と、この抵抗器
に発生する電圧を検出する第一の検出回路とを備
えた電磁弁の制御電流検出装置において、上記駆
動コイルに並列に、逆流防止ダイオードおよび第
二の抵抗器の直列回路と、この第二の抵抗器に発
生する電圧を検出する第二の検出回路と、この第
二の検出回路の検出出力を上記第一の検出回路の
検出出力に加算する回路とを備えたことを特徴と
する。
The control current detection circuit of the present invention consists of a first resistor inserted in series with the drive coil of a solenoid valve that repeats opening and closing at a constant cycle and controls the amount of fluid passing through depending on the opening duty ratio for the cycle; A control current detection device for a solenoid valve, which includes a first detection circuit that detects a voltage generated in a device, and a series circuit of a backflow prevention diode and a second resistor, and a series circuit of a backflow prevention diode and a second resistor in parallel with the drive coil. The present invention is characterized by comprising a second detection circuit that detects the voltage generated in the resistor, and a circuit that adds the detection output of the second detection circuit to the detection output of the first detection circuit.

〔作用〕[Effect]

制御入力により、電磁弁制御用トランジスタは
オンオフを行い、電磁弁駆動コイルへの電流を制
御する。
Based on the control input, the solenoid valve control transistor is turned on and off to control the current to the solenoid valve drive coil.

トランジスタがオン時すなわち、制御パルスが
ハイの時は第一の抵抗器の両端に生ずる電圧を第
一の演算増幅器を介して計測し、制御電流値を求
める。
When the transistor is on, that is, when the control pulse is high, the voltage generated across the first resistor is measured via the first operational amplifier to determine the control current value.

トランジスタがオフ時すなわち、制御パルスが
ロウの時は駆動コイルに逆流防止ダイオードを介
して並列に接続された第二の抵抗器に生ずる電圧
を第二の演算増幅器で増幅し、第一の演算増幅器
に加算して制御電流値を求める。
When the transistor is off, that is, when the control pulse is low, the voltage generated across the second resistor, which is connected in parallel to the drive coil through a backflow prevention diode, is amplified by the second operational amplifier, and the voltage generated at the second operational amplifier is amplified by the first operational amplifier. Find the control current value by adding it to

これにより、制御パルスのオンオフ時の双方の
電流値を計測することができ、より正確な制御電
流値を検出することができる。
Thereby, it is possible to measure both current values when the control pulse is on and off, and a more accurate control current value can be detected.

〔実施例〕〔Example〕

以下、図面を参照して実施例を説明する。 Examples will be described below with reference to the drawings.

第1図は本考案の一実施例を示す回路図である。FIG. 1 is a circuit diagram showing an embodiment of the present invention.

駆動コイルLの一端は駆動電源に接続され、他
端には制御入力によつてオンオフを行うトランジ
スタTrのコレクタが直列に接続される。トラン
ジスタTrのエミツタ側には抵抗R1が直列に接続
され、抵抗R1の他端は接地される。
One end of the drive coil L is connected to a drive power source, and the other end is connected in series with the collector of a transistor T r that is turned on and off by a control input. A resistor R1 is connected in series to the emitter side of the transistor Tr , and the other end of the resistor R1 is grounded.

この抵抗R1とトランジスタTrの接続点は抵抗
R2を介して演算増幅器OP1の非反転入力に接続さ
れる。
The connection point between this resistor R 1 and the transistor T r is a resistor
Connected via R 2 to the non-inverting input of operational amplifier OP 1 .

さて、駆動コイルには並列に逆流防止ダイオー
ドDが接続され、このダイオードDには直列に抵
抗R6が接続され、抵抗R6の他端は駆動電源側に
接続される。
Now, a backflow prevention diode D is connected in parallel to the drive coil, a resistor R6 is connected in series to this diode D, and the other end of the resistor R6 is connected to the drive power supply side.

駆動コイルLに並列に接続された抵抗R6の両
端は抵抗R7、抵抗R9および抵抗R8、抵抗R10から
なる抵抗分圧回路に接続される。この抵抗分圧回
路の分圧端子は抵抗R11、抵抗R12、抵抗R13を介
して演算増幅器OP2の入力に接続される。
Both ends of the resistor R 6 connected in parallel to the drive coil L are connected to a resistor voltage divider circuit including a resistor R 7 , a resistor R 9 , a resistor R 8 , and a resistor R 10 . The voltage dividing terminal of this resistive voltage dividing circuit is connected to the input of the operational amplifier OP 2 via a resistor R 11 , a resistor R 12 , and a resistor R 13 .

この演算増幅器OP2の出力は抵抗R15を介して
上述の演算増幅器OP1の非反転入力に接続され
る。
The output of this operational amplifier OP 2 is connected via a resistor R 15 to the non-inverting input of the above-mentioned operational amplifier OP 1 .

演算増幅器OP1の出力は抵抗R5とコンデンサC
により構成される平滑回路を介して図外のアナロ
グ・デイジタル変換器に導かれる。
The output of operational amplifier OP 1 is connected to resistor R 5 and capacitor C
The signal is led to an analog-to-digital converter (not shown) through a smoothing circuit configured by the following.

次に、この制御電流検出回路の動作を説明す
る。
Next, the operation of this control current detection circuit will be explained.

制御入力端子に電磁弁を開とするハイレベルの
制御パルスが入力した場合は、トランジスタTr
がオンとなり、駆動電源から駆動コイルLへ電流
が流れる。この電流は抵抗R1を流れ、そこに電
圧を生ずる。この電圧は抵抗R2を介して、演算
増幅器OP1の非反転入力に入力されて、増幅さ
れ、抵抗R5とコンデンサCによつてその波形は
平滑されて、図外のアナログ・デイジタル変換器
によりデイジタル信号に変換される。この時、抵
抗R6には逆流防止ダイオードDにより、電流は
流れない。
When a high-level control pulse that opens the solenoid valve is input to the control input terminal, the transistor T r
is turned on, and current flows from the drive power supply to the drive coil L. This current flows through resistor R1 and creates a voltage there. This voltage is input to the non-inverting input of the operational amplifier OP 1 via the resistor R 2 and is amplified, and its waveform is smoothed by the resistor R 5 and the capacitor C. is converted into a digital signal by At this time, no current flows through the resistor R6 due to the backflow prevention diode D.

制御入力端子に電磁弁を閉とするロウレベルの
制御パルスが入力した場合にはトランジスタTr
がオフとなり、駆動電源から駆動コイルLを通つ
て流れている電流は遮断される。このとき、駆動
コイルLからは、電磁誘導により生じた誘導電流
がダイオードDを通つて抵抗R6に流れ、その両
端には電圧差が生ずる。実施例ではこの抵抗R6
の抵抗値は7.5Ωとしている。この抵抗R6で生じ
た電圧差は、抵抗R8、抵抗R10からなる分圧回路
と、抵抗R7、抵抗R9からなる分圧回路とのそれ
ぞれの接続点間の電圧差として検出される。
When a low-level control pulse that closes the solenoid valve is input to the control input terminal, the transistor T r
is turned off, and the current flowing from the drive power source through the drive coil L is cut off. At this time, an induced current generated by electromagnetic induction flows from the drive coil L to the resistor R6 through the diode D, and a voltage difference is generated between both ends thereof. In the example this resistance R 6
The resistance value is 7.5Ω. The voltage difference generated at this resistor R 6 is detected as the voltage difference between the connection points of the voltage divider circuit consisting of resistor R 8 and resistor R 10 and the voltage divider circuit consisting of resistor R 7 and resistor R 9 . Ru.

この実施例では、抵抗R7とR8は4.7KΩ、抵抗
R910は330Ωとし、その分圧比を1/15として
いる。この接続点間に生じた電圧差は、抵抗
R11、抵抗R12、抵抗R13を介して、演算増幅器
OP2に入力される。
In this example, resistors R 7 and R 8 are 4.7KΩ, resistors
R 9 and 10 are 330Ω, and the voltage division ratio is 1/15. The voltage difference created between this connection point is the resistance
Operational amplifier via R 11 , resistor R 12 , resistor R 13
Entered into OP 2 .

演算増幅器OP2の出力は抵抗R15を介して演算
増幅器OP1に入力され、演算増幅器OP1で増幅さ
れ平滑回路をへてアナログ・デイジタル変換器へ
導かれる。
The output of operational amplifier OP2 is input to operational amplifier OP1 via resistor R15 , amplified by operational amplifier OP1 , and guided to an analog-to-digital converter through a smoothing circuit.

このように、制御入力のオンとオフ双方におけ
る制御電流による電圧が演算増幅器で増幅され、
アナログ・デイジタル変換器へ導かれて、制御電
流を計測することができる。
In this way, the voltage due to the control current both on and off the control input is amplified by the operational amplifier,
The control current can be measured by leading to an analog-to-digital converter.

この結果、本考案では第3図bの斜線部分の電
流をt3時間測定することになる。実際の電磁弁の
動作時間t1とt3との誤差はブリツジ回路の分圧比
あるいは増幅度の設定、加算比率等を調整するこ
とにより小さくすることができる。
As a result, in the present invention, the current in the shaded area in FIG. 3b is measured for time t3 . The error between the actual operating times t 1 and t 3 of the solenoid valve can be reduced by adjusting the partial pressure ratio or amplification setting of the bridge circuit, addition ratio, etc.

なお、上述のように、実施例ではブリツジ回路
の分圧比は1/15に設定したが、その比率は自由
に設定できる。また、演算増幅器の増幅度、加算
比率は1に設定したが、増幅度、加算比率の設定
も自由にできる。
Note that, as described above, in the embodiment, the voltage division ratio of the bridge circuit is set to 1/15, but the ratio can be set freely. Further, although the amplification degree and addition ratio of the operational amplifier are set to 1, the amplification degree and addition ratio can be set freely.

〔考案の効果〕[Effect of idea]

上述のごとく、本考案は、制御入力がオフの状
態の制御電流も検出することができるので、制御
電流を小さな誤差で検出することができる。
As described above, the present invention can detect the control current even when the control input is off, so the control current can be detected with a small error.

このため、電磁弁の制御の誤差を小さくするこ
とができ、自動車のクラツチ制御をより正確に行
うことを可能にする。
Therefore, errors in control of the solenoid valve can be reduced, making it possible to more accurately control the clutch of an automobile.

【図面の簡単な説明】[Brief explanation of the drawing]

第1図は本考案の一実施例を示す回路図。第2
図は従来例回路図。第3図は制御パルス応答を示
す波形図。 L……駆動コイル、Tr……トランジスタ、D
……ダイオード、OP……演算増幅器、R……抵
抗、C……コンデンサ。D……S5277、OP……
TA75358、R1……0.5Ω(2W)、R2……100kΩ、R3
……8.2kΩ、R4……100kΩ、R5……220kΩ、R6
…7.5Ω(1W)、R7……4.7kΩ、R8……4.7kΩ、R9
……330Ω、R10……330Ω、R11……33kΩ、R12
…33kΩ、R13……33kΩ、R14……33kΩ、R15……
100kΩ、C……473pF。
FIG. 1 is a circuit diagram showing an embodiment of the present invention. Second
The figure is a conventional circuit diagram. FIG. 3 is a waveform diagram showing control pulse response. L...Drive coil, T r ...Transistor, D
...Diode, OP...Operation amplifier, R...Resistor, C...Capacitor. D...S5277, OP...
TA75358, R1 ...0.5Ω (2W), R2 ...100kΩ, R3
...8.2kΩ, R 4 ...100kΩ, R 5 ...220kΩ, R 6 ...
…7.5Ω (1W), R 7 …4.7kΩ, R 8 …4.7kΩ, R 9
...330Ω, R 10 ...330Ω, R 11 ...33kΩ, R 12 ...
...33kΩ, R 13 ...33kΩ, R 14 ...33kΩ, R 15 ...
100kΩ, C...473pF.

Claims (1)

【実用新案登録請求の範囲】 開閉を一定周期で繰り返しその周期に対する開
デユーテイ比により流体の通過量が制御される電
磁弁の駆動コイルに直列に挿入された第一の抵抗
器R1と、 この抵抗器に発生する電圧を検出する第一の検
出回路と を備えた電磁弁の制御電流検出装置において、 上記駆動コイルに並列に、逆流防止ダイオード
Dおよび第二の抵抗器R6の直列回路と、 この第二の抵抗器に発生する電圧を検出する第
二の検出回路と、 この第二の検出回路の検出出力を上記第一の検
出回路の検出出力に加算する回路と、 を備えたことを特徴とする電磁弁の制御電流検出
装置。
[Claims for Utility Model Registration] A first resistor R 1 inserted in series with the drive coil of a solenoid valve that repeats opening and closing at a constant cycle and controls the amount of fluid passing through depending on the opening duty ratio for the cycle; A control current detection device for a solenoid valve comprising a first detection circuit that detects a voltage generated in a resistor, and a series circuit of a backflow prevention diode D and a second resistor R6 in parallel with the drive coil. , a second detection circuit that detects the voltage generated in the second resistor, and a circuit that adds the detection output of the second detection circuit to the detection output of the first detection circuit. A control current detection device for a solenoid valve, characterized by:
JP13650486U 1986-09-05 1986-09-05 Expired JPH0443653Y2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP13650486U JPH0443653Y2 (en) 1986-09-05 1986-09-05

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP13650486U JPH0443653Y2 (en) 1986-09-05 1986-09-05

Publications (2)

Publication Number Publication Date
JPS6342987U JPS6342987U (en) 1988-03-22
JPH0443653Y2 true JPH0443653Y2 (en) 1992-10-15

Family

ID=31039681

Family Applications (1)

Application Number Title Priority Date Filing Date
JP13650486U Expired JPH0443653Y2 (en) 1986-09-05 1986-09-05

Country Status (1)

Country Link
JP (1) JPH0443653Y2 (en)

Also Published As

Publication number Publication date
JPS6342987U (en) 1988-03-22

Similar Documents

Publication Publication Date Title
JPS6318761B2 (en)
GB1419340A (en) Temperature or other variable compensating system
JPS62228653A (en) Exhaust-gas recirculating control system
US20030098686A1 (en) Device and method for detecting the position of an object
GB2047440A (en) Exhaust gas recirculation control system
JPH0443653Y2 (en)
US4417471A (en) Gas flow measuring device
JPS6319711B2 (en)
CA1138929A (en) Voltage-to-current converter
JPS59101000A (en) Apparatus for measuring drive parameter of internal combustion engine
JPS6170154A (en) Transducer means detecting movement of part
US6529064B2 (en) Method and device for controlling an electrical load
US5119683A (en) Solenoid controller with flyback pulses useful for diagnostics and/or control
US7013725B1 (en) System and method for regulating bridge voltage in a discontinuous-time hot-wire anemometer
US4665745A (en) Heat wire type air flowrate measuring apparatus
JP2536737B2 (en) Inductive load current detection circuit
JPS629076A (en) Solenoid valve driving device
JPH0535338Y2 (en)
JPH0530172Y2 (en)
KR960021639A (en) Vehicle air conditioning controller
JPS5844330Y2 (en) drive circuit
JP2004505596A (en) Self-inducing element, in particular a device for regulating the current passing through an electromagnetic valve
JPH0254612B2 (en)
KR970021878A (en) Electronic proportional valve drive control circuit
GB2121186A (en) Measuring flow of a medium