Sensor Signal Processing Device
The sensor signal processing device accurately measures fluid flow rates by adjusting threshold voltages and gain, achieving miniaturization and cost reduction in ultrasonic flowmeters.
Patent Information
- Application Number
- JP2023117311
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2023-07-19
- Publication Date
- 2024-10-03
- Estimated Expiration
- 2037-08-10
AI Technical Summary
Existing ultrasonic flowmeters do not accurately measure fluid flow rates and are not optimized for miniaturization and cost reduction.
A sensor signal processing device with a configuration that includes a first and second ultrasonic sensor, a comparator, switches for setting threshold voltages, and a control unit to manage these switches, allowing for precise measurement of fluid flow rates by adjusting threshold voltages and gain, and minimizing power consumption.
Enables accurate fluid flow rate measurement while reducing device size and cost, with improved signal processing and power efficiency.
Smart Images

Figure 0007561243000001 
Figure 0007561243000002 
Figure 0007561243000003
Abstract
Description
[Technical field]
[0001] The present invention relates to a sensor signal processing device. [Background technology]
[0002] Conventionally, various devices have been proposed for measuring the flow rate of a fluid using ultrasound, one example of which is disclosed in Patent Document 1.
[0003] The ultrasonic flowmeter of Patent Document 1 includes a first ultrasonic sensor arranged on the upstream side of the fluid flow and a second ultrasonic sensor arranged on the downstream side. The flow rate of the fluid is measured based on the time taken for ultrasonic waves transmitted from the first ultrasonic sensor to be received by the second ultrasonic sensor, and the time taken for ultrasonic waves transmitted from the second ultrasonic sensor to be received by the first ultrasonic sensor.
[0004] The first ultrasonic sensor and the second ultrasonic sensor each include a wedge. The wedge is provided with an ultrasonic transmitter / receiver and is installed on the outer circumferential surface of the pipe through which the fluid flows. The wedge directs ultrasonic waves transmitted from the ultrasonic transmitter / receiver into the fluid at a desired angle.
[0005] In addition, the wedge is provided with a notch, which makes it difficult for the pipe-propagated wave incident on the wedge to reach the ultrasonic transmitter-receiver due to being obstructed by the notch, thereby making the energy of the pipe-propagated wave that reaches the ultrasonic transmitter-receiver smaller than the energy of the fluid-propagated wave, thereby improving the S / N ratio. [Prior art documents] [Patent documents]
[0006] [Patent Document 1] JP 2014-157071 A Summary of the Invention [Problem to be solved by the invention]
[0007] As described above, Patent Document 1 claims that the flow rate of a fluid can be accurately measured. However, Patent Document 1 does not disclose a configuration for accurately measuring the flow rate of a sensor signal processing device that processes a sensor signal output from an ultrasonic sensor.
[0008] In view of the above circumstances, an object of the present invention is to provide a sensor signal processing device that is capable of measuring the flow rate of a fluid with high accuracy and that can be made smaller and less expensive. [Means for solving the problem]
[0009] In order to achieve the above object, one aspect of the present invention is a sensor signal processing device that processes sensor signals output from a first sensor capable of transmitting and receiving a signal, and a second sensor that is disposed downstream of the first sensor in a fluid flow and is capable of transmitting and receiving a signal, the sensor signal processing device comprising: a comparator having one input terminal receiving a signal based on the sensor signal; a first switch that switches whether or not a reference voltage for setting a zero-cross threshold voltage is applied to the other input terminal of the comparator; a second switch for switching whether or not an envelope reference voltage for setting an envelope threshold voltage is applied to the other input terminal; a third switch that switches whether or not an error detection reference voltage for setting an error detection threshold voltage is applied to the other input terminal; a control unit that performs switching control of the first switch, the second switch, and the third switch based on an output of the comparator; Equipped with a first voltage divider circuit for generating the envelope threshold voltage; A second voltage divider circuit that generates the error detection threshold voltage; the first voltage dividing circuit includes a first resistor for voltage division and a first switch connected in series to the first resistor; the second voltage dividing circuit includes a second resistor for voltage division and a second switch connected in series to the second resistor; The first switch and the second switch are switched on and off by an analog signal that is a power supply voltage of the comparator (first configuration).
[0010] In the first configuration, the sensor device further includes an amplifier that amplifies the sensor signal, The control unit is capable of switching the error detection reference voltage between two levels, The control unit may be configured to adjust a gain of the amplifier according to an output of the comparator in a state in which the error detection reference voltage is applied to the other input terminal (second configuration).
[0011] In addition, in the above second configuration, the control unit may be configured to switch the error detection reference voltage by changing a voltage division ratio by switching whether or not to bypass both ends of a resistor (third configuration).
[0012] In addition, in any of the above first to third configurations, the control unit may be configured to calculate a propagation time between the first sensor and the second sensor based on multiple timings at which the signal input to the one input terminal crosses the zero-cross threshold voltage (fourth configuration).
[0013] In the fourth configuration, the control unit applies the zero-cross threshold voltage to the other input terminal when the signal input to the one input terminal becomes equal to or higher than the envelope threshold voltage, When a signal input to the one input terminal becomes equal to or greater than the zero-cross threshold voltage, the error detection threshold voltage is applied to the other input terminal; Thereafter, the zero-cross threshold voltage may be applied to the other input terminal (fifth configuration).
[0014] In addition, in any of the above first to fifth configurations, the control unit may be configured to interrupt the process of performing the switching control if the signal input to the one input terminal does not become equal to or greater than the envelope threshold voltage before a certain period of time has elapsed (sixth configuration).
[0015] In any one of the first to sixth configurations, an H-bridge circuit that drives the first sensor and the second sensor; A converter that converts the sensor signal output via the H-bridge circuit into a current / voltage. The output of the converter may be input to the one input end (seventh configuration).
[0016] In any one of the first to seventh configurations, the first sensor and the second sensor may be ultrasonic sensors (eighth configuration).
[0017] Moreover, one aspect of the present invention is a sensor system (ninth configuration) including the sensor signal processing device of any one of the first to eighth configurations, the first sensor, and the second sensor. Effect of the Invention
[0018] According to the sensor signal processing device of the present invention, it is possible to measure the flow rate of a fluid with high accuracy, and it is possible to achieve miniaturization and cost reduction. [Brief description of the drawings]
[0019] [Figure 1] 1 is a schematic diagram showing a configuration of an ultrasonic sensor system according to an embodiment of the present invention; [Diagram 2] 1 is a diagram showing an example of a configuration of a sensor signal processing device according to the present invention; [Diagram 3] FIG. 1 is a diagram illustrating a specific example of the configuration of an H-bridge circuit. [Figure 4] 4 is a flowchart showing a flow rate measurement process performed by the sensor signal processing device. [Diagram 5] 10 is a flowchart showing some of the processing steps specifically performed in the reception process. [Figure 6] 10 is a flowchart showing some of the processing steps specifically performed in the reception process. [Figure 7]10 is a flowchart showing some of the processing steps specifically performed in the reception process. [Figure 8] 13 is a flow chart of a process for determining a flow measurement value. [Figure 9] 4 is a timing chart showing an example of a burst wave and an ultrasonic signal. [Figure 10] FIG. 1 is a diagram illustrating a configuration of a sensor signal processing device according to a comparative example. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0020] Hereinafter, an embodiment of the present invention will be described with reference to the drawings.
[0021] <1. Ultrasonic sensor system configuration> Fig. 1 is a schematic diagram showing the configuration of an ultrasonic sensor system according to an embodiment of the present invention. The ultrasonic sensor system 500 shown in Fig. 1 is a system that uses ultrasonic waves to measure the flow rate of a fluid flowing in a pipe P1 along an axial direction D1. The ultrasonic sensor system 500 includes a first ultrasonic sensor 101 (first sensor), a second ultrasonic sensor 102 (second sensor), a sensor signal processing device 200, and a microcomputer 300. The ultrasonic sensor system 500 can be used, for example, in a gas meter that measures the consumption of city gas or the like, but may also be used for other purposes.
[0022] The sensor signal processing device 200 is a semiconductor integrated circuit that processes the sensor signals output from the first ultrasonic sensor 101 and the second ultrasonic sensor 102. The sensor signal processing device 200 is connected to the microcomputer 300, and outputs the processing results of the sensor signals to the microcomputer 300.
[0023] The first ultrasonic sensor 101 and the second ultrasonic sensor 102 are installed in the pipe P1. The installation position of the first ultrasonic sensor 101 and the installation position of the second ultrasonic sensor 102 are shifted from each other in the axial direction D1 of the pipe P1. Specifically, the first ultrasonic sensor 101 is disposed on the upstream side of the flow of fluid along the axial direction D1 in the pipe P1, and the second ultrasonic sensor 102 is disposed on the downstream side of the flow.
[0024] The sensor signal processing device 200 measures the flow rate of the fluid flowing through the pipe P1 based on the difference between time T1 and time T2. Time T1 is the time it takes for the ultrasonic wave transmitted from the first ultrasonic sensor 101 to be received by the second ultrasonic sensor 102. Time T2 is the time it takes for the ultrasonic wave transmitted from the second ultrasonic sensor 102 to be received by the first ultrasonic sensor 101.
[0025] 2. Configuration of sensor signal processing device 2 is a diagram showing an example of a configuration of the sensor signal processing device 200. The sensor signal processing device 200 mainly includes an H-bridge circuit 1, an I / V amplifier (current / voltage conversion amplifier) 2, a first PGA (programmable gain amplifier) 3, a second PGA 4, a comparator 5, a logic unit 6 (control unit), a switch control circuit 7, an electronic volume 8, switches SW1 to SW3, and switches S1 to S3. The comparator 5 is a hysteresis comparator.
[0026] The H-bridge circuit 1 is connected to a first ultrasonic sensor 101 and a second ultrasonic sensor 102. Here, a specific configuration example of the H-bridge circuit 1 is shown in Fig. 3. As shown in Fig. 3, the H-bridge circuit 1 has switches Q1 to Q4 that configure an H bridge, switches Q5 to Q8 that configure an H bridge, and switches 11 to 14.
[0027] A predetermined power supply voltage SWREG1 is applied to the source of switch Q1, which is a p-channel MOSFET, and the source of switch Q2, which is a p-channel MOSFET. The drain of switch Q1 is connected to the drain of switch Q3, which is an n-channel MOSFET. The drain of switch Q2 is connected to the drain of switch Q4, which is an n-channel MOSFET. A ground potential is applied to the sources of switch Q3 and Q4. One end of a first ultrasonic sensor 101 is connected to a connection node between switches Q1 and Q3. The other end of the first ultrasonic sensor 101 is connected to a connection node between switches Q2 and Q4. Switches 11 and 12 are disposed in paths between each end of the first ultrasonic sensor 101 and each input end of the I / V amplifier 2, respectively.
[0028] A predetermined power supply voltage SWREG2 is applied to the source of switch Q5, which is a p-channel MOSFET, and the source of switch Q6, which is a p-channel MOSFET. The drain of switch Q5 is connected to the drain of switch Q7, which is an n-channel MOSFET. The drain of switch Q6 is connected to the drain of switch Q8, which is an n-channel MOSFET. A ground potential is applied to the source of switch Q7 and the source of switch Q8. One end of a second ultrasonic sensor 102 is connected to a connection node between switches Q5 and Q7. The other end of the second ultrasonic sensor 102 is connected to a connection node between switches Q6 and Q8. Switches 13 and 14 are disposed in paths between each end of the second ultrasonic sensor 102 and each input end of the I / V amplifier 2, respectively.
[0029] The on / off of each of the switches Q1 to Q4 is controlled by the logic unit 6. Specifically, when the switches Q1 and Q4 are on, the switches Q2 and Q3 are off, and when the switches Q1 and Q4 are off, the switches Q2 and Q3 are on. This allows a pulsed burst wave to be input to the first ultrasonic sensor 101 for driving. When the first ultrasonic sensor 101 is driven, the switches 11 and 12 are off. The on / off of the switches 11 and 12 is controlled by the logic unit 6. When the first ultrasonic sensor 101 is driven, the switches 13 and 14 are on. The on / off of the switches 13 and 14 is controlled by the logic unit 6.
[0030] As a result, ultrasonic waves output from the driven first ultrasonic sensor 101 into the pipe P1 pass through the fluid and are received by the second ultrasonic sensor 102, and a current signal serving as an ultrasonic signal (sensor signal) output from the second ultrasonic sensor 102 can be input to the I / V amplifier 2 via the switches 13 and 14. In this way, ultrasonic waves are transmitted from the first ultrasonic sensor 101 on the upstream side to the second ultrasonic sensor 102 on the downstream side.
[0031] Meanwhile, the on / off of each of the switches Q5 to Q8 is controlled by the logic unit 6. Specifically, when the switches Q5 and Q8 are on, the switches Q6 and Q7 are off, and when the switches Q5 and Q8 are off, the switches Q6 and Q7 are on. This allows a pulsed burst wave to be input to the second ultrasonic sensor 102 for driving. When the second ultrasonic sensor 102 is driven, the switches 13 and 14 are off, and the switches 11 and 12 are on.
[0032] As a result, ultrasonic waves output from the driven second ultrasonic sensor 102 into the pipe P1 pass through the fluid and are received by the first ultrasonic sensor 101, and a current signal serving as an ultrasonic signal (sensor signal) output from the first ultrasonic sensor 101 can be input to the I / V amplifier 2 via the switches 11 and 12. In this way, ultrasonic waves are transmitted from the second ultrasonic sensor 102 on the downstream side to the first ultrasonic sensor 101 on the upstream side.
[0033] The I / V amplifier 2 converts the current signal input from the H-bridge circuit 1 into a voltage signal and outputs it to the first PGA 3 via capacitors C11 and C12. The I / V amplifier 2 is driven by a power supply voltage Vcc. The capacitors C11 and C12 are DC blocking capacitors.
[0034] The first PGA 3 receives the voltage signal from the I / V amplifier 2 and adjusts it in accordance with the gain setting signal GS. The signal is amplified by a set gain and output to the second PGA 4 via the capacitors C21 and C22. The first PGA 3 is driven by a power supply voltage Vcc. The capacitors C21 and C22 are capacitors for blocking direct current. The gain setting signal GS is set by the logic unit 6.
[0035] The second PGA4 amplifies the voltage signal input from the first PGA3 with a gain set by the gain setting signal GS and outputs the amplified signal to the subsequent stage. The second PGA4 is driven by the power supply voltage Vcc. For example, the first PGA3 has a gain set by 3 bits, and the second PGA4 has a gain set by 5 bits. That is, the first PGA3 performs coarse adjustment of the amplification in a stage prior to the second PGA4.
[0036] The output terminal of the second PGA4 is connected to a connection node between one end of the resistor R1 and the inverting input terminal (-) of the comparator 5 via a capacitor C3. The capacitor C3 is a DC cut capacitor. A predetermined reference voltage Vref is applied to the other end of the resistor R1. A reference voltage Vref is also applied to one end of the resistor 2, and the other end is connected to the non-inverting input terminal (+) of the comparator 4 via a switch SW1. The reference voltage Vref is used to set a reference level of the ultrasonic signal output from the second PGA4. In order to avoid DC noise in zero-cross detection using an ultrasonic signal in the comparator 5, the same DC voltage (reference voltage Vref) is applied to both input terminals of the comparator 5. The applied DC voltage may be called a zero-cross threshold voltage.
[0037] A predetermined power supply voltage VREG is applied to one end of resistor R3. The other end of resistor R3 is connected to electronic volume 8. One end of resistor R4 is connected to electronic volume 8. The other end of resistor R4 is connected to a terminal to which ground potential is applied via switch S1. Switch S1 is switched on and off by analog signal ANG.
[0038] When the switch S1 is on, the resistance value of the electronic volume 8 changes according to the setting signal DPM, adjusts the voltage division ratio for dividing the power supply voltage VREG using resistors R3 and R4, and generates the divided voltage as the envelope reference voltage ENVREF at the connection node between the electronic volume 8 and resistor R4. The setting signal DPM is set by the logic unit 6. The envelope reference voltage ENVREF can be monitored by a monitor terminal M1 connected to the connection node. The electronic volume 8, resistors R3 and R4, and switch S1 form a first division circuit.
[0039] The above-mentioned connection node is connected via the switch SW2 to the non-inverting input terminal of the comparator 5. Thus, by turning on the switch SW2, the envelope reference voltage ENVREF can be input to the comparator 5, and the comparator 5 compares the ultrasonic signal with the envelope threshold voltage.
[0040] In addition, a power supply voltage VREG is applied to one end of resistor R5. The other end of resistor R5 is connected to one end of resistor R6. The other end of resistor R6 is connected to one end of resistor R7. The other end of resistor R7 is connected to an application terminal of ground potential via switch S2. Switch S3 is connected to both ends of resistor R7. Switch S3 is turned on and off in response to a switching signal ERCNT. The switching signal ERCNT is set by logic unit 6. Switch S2 is switched on and off by analog signal ANG.
[0041] When the switch S2 is on, the resistor R7 is bypassed or not depending on the on / off state of the switch S3, thereby adjusting the voltage division ratio for dividing the power supply voltage VREG using the resistors R5 and R6, and the divided voltage is generated as the error detection reference voltage ERREF at the connection node between the resistors R5 and R6. The connection node is connected to the non-inverting input terminal of the comparator 5 via the switch SW3. Thus, by turning on the switch W3, the error detection reference voltage ERREF can be input to the comparator 5, and the ultrasonic signal is compared with the error detection threshold voltage in the comparator 5. The resistors R5 to R7, the switch S2, and the switch S3 form a second voltage dividing circuit.
[0042] As described above, the analog signal ANG is a signal that controls the on / off of the switches S1 and S2, and also serves as the power supply voltage for the comparator 5. Specifically, when the analog signal ANG is at a level that turns on each of the switches S1 and S2, the analog signal ANG is supplied to the comparator 5 as the power supply voltage. When the analog signal ANG turns off each of the switches S1 and S2, the analog signal ANG does not supply the power supply voltage to the comparator 5. The analog signal ANG is set by the logic unit 6.
[0043] As a result, when the sensor signal processing device 200 is not performing reception processing of the sensor signal, the switches S1 and S2 are turned off by the analog signal ANG, and no power supply voltage is supplied to the comparator 5, thereby reducing unnecessary power consumption. Therefore, when the ultrasonic sensor system 500 is operated by a battery (not shown), the battery power consumption can be suppressed, enabling long-term use.
[0044] The switch control circuit 7 controls the on / off of the switches SW1 to SW3 in response to commands from the logic unit 6. This allows the threshold voltage to be compared with the ultrasonic signal in the comparator 5 to be switched. A comparison signal CMP, which is the comparison result output from the comparator 5, is input to the logic unit 6. The logic unit 6 switches the switches SW1 to SW3 based on the comparison signal CMP. The switching timing of the switches SW1 to SW3 will be described in detail later.
[0045] <3. Sensor signal processing> Next, sensor signal processing by the sensor signal processing device 200 will be described with reference to various flowcharts in Fig. 4 to Fig. 8. Fig. 4 is a flowchart showing flow rate measurement processing by the sensor signal processing device 200.
[0046] When the flow chart of Fig. 4 starts, first, in step S1, the sensor processing device 200 performs upstream transmission processing. Here, the logic unit 6 generates a burst wave for driving the first ultrasonic sensor 101 by driving the H bridge (Fig. 3) composed of the switches Q1 to Q4 in the H bridge circuit 1. As a result, ultrasonic waves are output from the first ultrasonic sensor 101 on the upstream side toward the inside of the pipe P1. Here, Fig. 9 shows an example of the generated burst wave BSW.
[0047] At this time, the logic unit 6 turns off the switches S1 and S2 in response to the analog signal ANG, and the supply of the power supply voltage to the comparator 5 is stopped.
[0048] After step S1, the process proceeds to step S2, where the sensor signal processing device 200 performs downstream reception processing. Here, ultrasonic waves transmitted from the first ultrasonic sensor 101 on the upstream side are received by the second ultrasonic sensor 102 on the downstream side, and the sensor signal (ultrasonic signal) output from the second ultrasonic sensor 102 is processed. The ultrasonic signal output from the second ultrasonic sensor 102 is input to the I / V amplifier 2 via the switches 13 and 14 (FIG. 3) that are turned on in the H-bridge circuit 1, is subjected to current / voltage conversion by the I / V amplifier 2, is amplified by the first PGA 3 and the second PGA 4, is level-adjusted by the reference voltage VREF, and is input to the inverting input terminal of the comparator 5.
[0049] In the downstream reception process, the logic unit 6 switches in response to the analog signal ANG. S1 and S2 are turned on, and the power supply voltage is supplied to the comparator 5.
[0050] Here, the specific processing steps performed in the reception process will be described with reference to the flowcharts of Figures 5 to 8. When the flowchart of Figure 5 starts, first, in step S21, the logic unit 6 instructs the switch control circuit 7 to turn on the switch SW2 and turn off the switches SW1 and SW3, and input the envelope reference voltage ENVREF to the non-inverting input terminal of the comparator 5. As a result, the threshold voltage to be compared with the ultrasonic signal in the comparator 5 is set to the envelope threshold voltage.
[0051] 9 shows an example of a waveform of an ultrasonic signal USW generated at the inverting input terminal of the comparator 5 after a time has elapsed since the generation of the burst wave BSW. Also, in step S21 in FIG. 9, the envelope threshold voltage EV_Vth is set.
[0052] After step S21, in step S22, the logic unit 6 determines whether the ultrasonic signal has become equal to or greater than the envelope threshold voltage based on the comparison signal CMP output from the comparator 5. If the ultrasonic signal has not become equal to or greater than the envelope threshold voltage (N in step S22) and the fixed time has not elapsed (N in step S23), the process returns to step S22. Note that the fixed time is the time that has elapsed since step S21.
[0053] If the level of the comparison signal CMP switches from High to Low before a certain period of time has elapsed, the logic unit 6 determines that the ultrasonic signal has become equal to or greater than the envelope threshold voltage (Y in step S22), and proceeds to step S25. This allows the signal input to the inverting input terminal of the comparator 5 before the envelope threshold voltage is reached to be ignored as noise, and the signal can be treated as an ultrasonic signal when it becomes equal to or greater than the envelope threshold voltage. In the example of FIG. 9, the ultrasonic signal USW is equal to or greater than the envelope threshold voltage EV_Vth at timing t1.
[0054] If the ultrasonic signal does not reach or exceed the envelope threshold voltage even after a certain period of time has elapsed (Y in step S23), the logic unit 6 will time out in step S24 and interrupt the downstream receiving process (step S2), the number of executions will not increase, and the process will return to step S1 without proceeding to step S3.
[0055] When the process proceeds to step S25, the logic unit 6 instructs the switch control circuit 7 to turn on the switch SW1 and turn off the switches SW2 and SW3. This causes the reference voltage VREF to be input to the non-inverting input terminal of the comparator 5. That is, the threshold voltage used for comparison in the comparator 5 is switched to the zero-cross threshold voltage. In the example of FIG. 9, the zero-cross threshold voltage ZERO_Vth is set. For example, the zero-cross threshold voltage ZERO_Vth (Vref) is set to 1.1V.
[0056] Then, in step S26, the logic unit 6 determines whether the ultrasonic signal is equal to or lower than the zero-cross threshold voltage based on the comparison signal CMP output from the comparator 5. If the ultrasonic signal is not equal to or lower than the envelope threshold voltage (N in step S26), the process returns to step S26. If the ultrasonic signal is equal to or lower than the zero-cross threshold voltage (Y in step S26), the process proceeds to step S27. In the example of FIG. 9, at timing t2, the ultrasonic signal USW is equal to or lower than the zero-cross threshold voltage ZERO_Vth.
[0057] Here, the logic unit 6 starts counting from the timing when the burst wave starts to be generated in the upstream transmission process (step S1), and counts until the timing when the ultrasonic signal becomes equal to or higher than the envelope threshold voltage (Y in step S22, t1 in FIG. 9). In this counting, a coarse counting is performed. Then, from the above timing, the logic unit 6 starts fine counting, and holds the elapsed time from the burst wave generation to the above timing based on the count value until the timing when the ultrasonic signal becomes equal to or lower than the zero cross threshold voltage (Y in step S26, t2 in FIG. 9) and the count value in the above coarse counting. That is, in the example of FIG. 9, the elapsed time (first elapsed time) from the timing t0 when the burst wave BSW is generated to the timing t2 is held.
[0058] When the process proceeds to step S27, the logic unit 6 determines whether the ultrasonic signal is equal to or greater than the zero-cross threshold voltage based on the comparison signal CMP. If the ultrasonic signal is not equal to or greater than the envelope threshold voltage (N in step S27), the process returns to step S27. If the ultrasonic signal is equal to or greater than the zero-cross threshold voltage (Y in step S27), the process proceeds to step S28 (FIG. 6). In the example of FIG. 9, at timing t3, the ultrasonic signal USW is equal to or greater than the zero-cross threshold voltage ZERO_Vth. The threshold for zero-cross detection is maintained from timing t1 onward to timing t3 in FIG. 9.
[0059] The logic unit 6 holds the elapsed time from the burst wave generation to the timing based on the count value from the start of the fine count to the timing when the ultrasonic signal becomes equal to or greater than the zero-cross threshold voltage and the count value in the coarse count. That is, in the example of Fig. 9, the elapsed time from timing t0 to timing t3 (second elapsed time) is held.
[0060] When the process proceeds to step S28, the logic unit 6 instructs the switch control circuit 7 to turn on the switch SW3 and turn off the switches SW1 and SW2. As a result, the error detection reference voltage ERREF is input to the non-inverting input terminal of the comparator 5. That is, the threshold voltage used for comparison in the comparator 5 is switched to the error detection threshold voltage. Here, by switching the level of the error detection reference voltage ERREF by the switching signal ERCNT, the threshold voltage can be set to the error detection first threshold voltage or the error detection second threshold voltage. The error detection second threshold voltage is at a higher level than the error detection first threshold voltage.
[0061] In the example of FIG. 9, a first error detection threshold voltage ER_L_Vth and a second error detection threshold voltage ER_H_Vth are shown, and here, the first error detection threshold voltage ER_L_Vth is set as the threshold voltage.
[0062] When the first error detection threshold voltage is set as the threshold voltage, in step S29, the logic unit 6 judges whether the ultrasonic signal is equal to or higher than the first error detection threshold voltage based on the comparison signal CMP. If not (N in step S29), the process proceeds to step S30, and if the fixed time has not elapsed (N in step S30), the process returns to step S29. The fixed time is the time elapsed since step S28.
[0063] If the ultrasonic signal becomes equal to or greater than the first error detection threshold voltage before the fixed time has elapsed (Y in step S29), the process proceeds to step S35. In the example of FIG. 9, the ultrasonic signal USW becomes equal to or greater than the first error detection threshold voltage ER_L_Vth at timing t4. On the other hand, if the fixed time has elapsed before the ultrasonic signal USW becomes equal to or greater than the first error detection threshold voltage (Y in step S30), the process proceeds to step S31, where the logic unit 6 increases the gains of the first PGA3 and the second PGA4 set by the setting signal GS in the next downstream reception process (step S2). In the case of Y in step S29, the gains are maintained.
[0064] On the other hand, if the error detection second threshold voltage is set as the threshold voltage, in step S32, the logic unit 6 determines whether the ultrasonic signal is equal to or higher than the error detection second threshold voltage based on the comparison signal CMP. If not (N in step S32), proceed to step S33, and if the fixed time has not elapsed (N in step S33), return to step S32. The above-mentioned certain period of time is the time elapsed from step S28.
[0065] If the ultrasonic signal becomes equal to or greater than the second error detection threshold voltage before the fixed time has elapsed (Y in step S32), the process proceeds to step S34, where the logic unit 6 reduces the gains set by the first PGA3 and the second PGA4 using the setting signal GS in the next downstream reception process (step S2). On the other hand, if the fixed time has elapsed before the ultrasonic signal becomes equal to or greater than the second error detection threshold voltage (Y in step S33), the process proceeds to step S35. In this case, the gains are maintained.
[0066] In step S28, if the previous downstream reception process proceeded to step S31, the first error detection threshold voltage is set, if the previous downstream reception process resulted in Y in step S29, the second error detection threshold voltage is set, if the previous downstream reception process resulted in Y in step S33, the first error detection threshold voltage is set, and if the previous downstream reception process proceeded to step S34, the second error detection threshold voltage is set.
[0067] By performing the processes of steps S28 to S34 each time the downstream reception process (step S2) is repeated, the ultrasonic signal is controlled to a level between the first error detection threshold voltage and the second error detection threshold voltage.
[0068] In the above, the error detection is judged using either the first error detection threshold voltage ER_L_Vth or the second error detection threshold voltage ER_H_Vth, but both thresholds may be used. That is, it is judged whether the ultrasonic signal becomes equal to or higher than the first error detection threshold voltage ER_L_Vth within a certain time from step S28. If it becomes equal to or higher than the first error detection threshold voltage ER_L_Vth, the error detection threshold voltage is switched to the second error detection threshold voltage ER_H_Vth, and it is judged whether the ultrasonic signal becomes equal to or higher than the second error detection threshold voltage ER_H_Vth within a certain time from the timing of switching to the second error detection threshold voltage ER_H_Vth or within a certain time from step S28. If it does not become equal to or higher than the second error detection threshold voltage ER_H_Vth, the process proceeds to step S35. Furthermore, if the ultrasonic signal does not become equal to or greater than the first error detection threshold voltage ER_L_Vth within a certain period of time, the gain is increased, and if the ultrasonic signal becomes equal to or greater than the second error detection threshold voltage ER_H_Vth within the certain period of time, the gain is decreased.
[0069] If the process proceeds to step S31 or step S34, it is determined that the level of the ultrasonic signal is not appropriate and an error has occurred, and the logic unit 6 stores this information. If the process proceeds to step S31 or step S34, the process also proceeds to step S35.
[0070] The error detection threshold voltage as the threshold voltage of the comparator 5 is maintained within a set certain time from step S28 (t3 in FIG. 9). During that time, the switch SW3 is turned on and the switches SW1 and SW2 are turned off.
[0071] In step S35, the logic unit 6 instructs the switch control circuit 7 to turn on the switch SW1 and turn off the switches SW2 and SW3. This causes the reference voltage VREF to be input to both the inverting input terminal and the non-inverting input terminal of the comparator 5. That is, the threshold voltage used for comparison in the comparator 5 is switched to the zero-cross threshold voltage. In the example of FIG. 9, the zero-cross threshold voltage ZERO_Vth is set.
[0072] Then, the process proceeds to step S36 (FIG. 7), where the logic unit 6 determines whether the ultrasonic signal is equal to or lower than the zero-cross threshold voltage based on the comparison signal CMP. If the ultrasonic signal is not equal to or lower than the envelope threshold voltage (N in step S36), the process returns to step S36. If the ultrasonic signal is equal to or lower than the zero-cross threshold voltage (Y in step S36), the process proceeds to step S37. In the example of FIG. 9, at timing t5, the ultrasonic signal USW is equal to or lower than the zero-cross threshold voltage ZERO_Vth.
[0073] The logic unit 6 holds the elapsed time from the burst wave generation to the above timing based on the count value from the start of the fine count to the timing when the ultrasonic signal becomes equal to or lower than the zero-cross threshold voltage and the count value in the coarse count described above. That is, in the example of Fig. 9, the elapsed time from timing t0 to timing t5 (third elapsed time) is held.
[0074] When the process proceeds to step S37, the logic unit 6 determines whether the ultrasonic signal is equal to or greater than the zero-cross threshold voltage based on the comparison signal CMP. If the ultrasonic signal is not equal to or greater than the envelope threshold voltage (N in step S37), the process returns to step S37. If the ultrasonic signal is equal to or greater than the zero-cross threshold voltage (Y in step S37), the process proceeds to step S38. In the example of FIG. 9, at timing t6, the ultrasonic signal USW is equal to or greater than the zero-cross threshold voltage ZERO_Vth.
[0075] The logic unit 6 holds the elapsed time from the burst wave generation to the above timing based on the count value from the start of the fine count to the timing when the ultrasonic signal becomes equal to or greater than the zero-cross threshold voltage and the count value in the coarse count described above. That is, in the example of Fig. 9, the elapsed time from timing t0 to timing t6 (fourth elapsed time) is held.
[0076] In step S38, the logic unit 6 calculates the average value of the four elapsed times (the first elapsed time to the fourth elapsed time) that have been held as the propagation time of the ultrasonic wave from the upstream side to the downstream side. In the example of Fig. 9, the propagation time Tp is calculated as the average value of the elapsed times from the timing t0 at which the burst wave BSW is generated to each of the timings t2, t3, t5, and t6.
[0077] In step S38, the downstream side receiving process (step S2) is completed (END). Thereafter, as shown in Fig. 4, the process proceeds to the downstream side transmitting process in step S3. Here, the logic unit 6 drives the H bridge (Fig. 3) composed of the switches Q5 to Q8 in the H bridge circuit 1 to generate a burst wave for driving the second ultrasonic sensor 102. As a result, ultrasonic waves are output from the second ultrasonic sensor 102 on the downstream side toward the inside of the pipe P1.
[0078] At this time, the logic unit 6 turns off the switches S1 and S2 in response to the analog signal ANG, and the supply of the power supply voltage to the comparator 5 is stopped.
[0079] After step S3, the process proceeds to step S4, where the sensor signal processing device 200 performs upstream reception processing. Here, ultrasonic waves transmitted from the downstream second ultrasonic sensor 102 are received by the upstream first ultrasonic sensor 101, and the sensor signal (ultrasonic signal) output from the first ultrasonic sensor 101 is processed. The ultrasonic signal output from the first ultrasonic sensor 101 is input to the I / V amplifier 2 via the switches 11 and 12 (FIG. 3) that are turned on in the H-bridge circuit 1, is subjected to current / voltage conversion by the I / V amplifier 2, is amplified by the first PGA 3 and the second PGA 4, is level-adjusted by the reference voltage VREF, and is input to the inverting input terminal of the comparator 5.
[0080] In the upstream reception process, the logic unit 6 turns on the switches S1 and S2 in response to the analog signal ANG, and supplies the power supply voltage to the comparator 5.
[0081] The process steps specifically performed in the upstream reception process are the same as those shown in the flowcharts of Figures 5 to 7. That is, the logic unit 6 commands the switch control circuit 7 to control the switching of the switches SW1 to SW3, thereby switching the threshold voltage used for comparison in the comparator 5. If a timeout occurs that would cause the process to proceed to step S24 in Figure 5, the process is interrupted, the number of executions is not incremented, and the process returns to step S1 without proceeding to step S5.
[0082] At this time, the processing of steps S28 to S34 (FIG. 6) is performed every time the upstream reception processing is performed, so that the ultrasonic signal is controlled to a level between the first error detection threshold voltage and the second error detection threshold voltage in the upstream reception processing. That is, the attenuation of the ultrasonic wave changes depending on the propagation time, but the level of the ultrasonic signal is controlled to be approximately the same in the downstream reception processing and the upstream reception processing, regardless of the flow speed of the fluid. If the levels of the ultrasonic waves are not approximately the same, the timing at which the ultrasonic signal becomes equal to or greater than the envelope threshold voltage will differ, and the timing of the zero crossing at which the elapsed time is obtained will differ, so that the propagation times calculated in the downstream reception processing and the upstream reception processing may not be appropriate for taking the difference. Therefore, by controlling the levels of the ultrasonic signals to be approximately the same, the measurement accuracy of the flow rate of the fluid can be improved.
[0083] After the upstream reception process in step S4, the process proceeds to step S5, where the logic unit 6 calculates a difference between the propagation times calculated in the downstream reception process (step S2) and the upstream reception process (step S4). If an error occurs in at least one of the downstream reception process and the upstream reception process, the logic unit 6 also stores a notice of the error occurrence in association with the difference value. If a timeout occurs in step S24 (FIG. 5) in at least one of the downstream reception process and the upstream reception process, the difference value is not calculated, and a notice of the error occurrence is stored.
[0084] Next, the process proceeds to step S6, where the logic unit 6 determines whether the processes of steps S1 to S5 have been performed a predetermined number of times. The predetermined number of times is, for example, 64 times. If the processes have not been performed the predetermined number of times (N in step S6), the process returns to step S1.
[0085] Then, if the predetermined number of times has been performed (Y in step S6), the process proceeds to step S7. In step S7, specifically, the process steps of the flowchart shown in FIG. 8 are performed. First, in step S41, the logic unit 6 determines whether the number of difference values of propagation time obtained without error occurrence by performing the predetermined number of times (step S5) is equal to or greater than a predetermined threshold value. This threshold value may be, for example, half the predetermined number of times (i.e., if the predetermined number of times is 64, the threshold value is 32, etc.).
[0086] If the number of normal difference values obtained is equal to or greater than the threshold number (Y in step S41), the logic unit 6 calculates the average value of all the difference values obtained by performing the predetermined number of times, and calculates the flow rate of the fluid based on the calculated average value. The calculated flow rate is determined as the current flow rate measurement value. On the other hand, if the number of normal difference values does not reach the threshold number (N in step S41), there is a possibility that the accuracy of calculating the flow rate based on the difference values will be poor, so the logic unit 6 does not calculate the flow rate, but determines the previous flow rate measurement value as the current flow rate measurement value.
[0087] When the flow rate measurement value is determined in step S7 in this manner, the process proceeds to step S8, where the logic unit 6 resets the number of times steps S1 to S5 have been performed, and the process returns to step S1.
[0088] As described above, according to the sensor signal processing device 200 of this embodiment, in the downstream side reception processing and the upstream side reception processing, the threshold voltages to be compared with the ultrasonic signal in the comparator 5 are switched between an envelope threshold voltage for noise removal, an error detection threshold voltage for level adjustment, and a zero crossing threshold voltage, so that it is possible to accurately calculate the difference value of each propagation time between the upstream side and the downstream side, and it is possible to accurately measure the flow rate of the fluid. .
[0089] In the above-mentioned embodiment, the propagation time is calculated as the average value of the elapsed time at four timings (t2, t3, t5, and t6 in FIG. 9) where the ultrasonic signal crosses the zero-cross threshold voltage, but the invention is not limited to this. For example, in FIG. 9, the average value of the elapsed time at only two of the timings t2, t3, t5, and t6 may be calculated, or the propagation time may be the elapsed time at only one of the timings.
[0090] The envelope threshold voltage may be a fixed value, but may be adjustable by the logic unit 6 as follows. The envelope threshold voltage is increased and changed each time downstream reception processing or upstream reception processing is performed. At this time, if the amount of change from the propagation time calculated last time to the propagation time calculated this time is equal to or greater than the threshold, the set value (first set value) of the current envelope threshold voltage is stored. When the envelope threshold voltage is increased, when the envelope threshold voltage exceeds the peak of a certain waveform that protrudes upward from the zero-cross level of the ultrasonic signal, the envelope threshold voltage becomes equal to or greater than the envelope threshold voltage in a waveform adjacent in time to the certain waveform, so that the timing of intersection with the four zero-cross threshold voltages is shifted, and the calculated propagation time changes significantly. In other words, the first set value corresponds to the peak of the certain waveform.
[0091] After storing the first set value, the envelope threshold voltage is further increased and changed, and when the change amount from the previously calculated propagation time to the currently calculated propagation time again becomes equal to or greater than the threshold, the current set value of the envelope threshold voltage (second set value) is stored. This second set value corresponds to the peak of the waveform adjacent in time to the certain waveform. Then, the midpoint between the first set value and the second set value is determined as the envelope threshold voltage. The envelope threshold voltage can be changed by controlling the electronic volume 8 with the setting signal DPM.
[0092] By adjusting the envelope threshold voltage in this manner, it is possible to suppress the waveform of an ultrasonic signal that exceeds the envelope threshold voltage from being shifted in time, and to suppress adverse effects on the calculated propagation time.
[0093] <4. Comparison with Comparative Examples> 10 is a diagram showing the configuration of a sensor signal processing device 201 according to a comparative example for comparison with this embodiment. The difference in the configuration of the sensor signal processing device 201 compared to the sensor signal processing device 200 according to this embodiment (FIG. 2) is that the sensor signal processing device 201 includes a first comparator 51, a second comparator 52, and a third comparator 53 as comparators.
[0094] The output terminal of the second PGA 4 is connected to each of the inverting input terminals of the first comparator 51 to the third comparator 53. That is, an ultrasonic signal is input to each inverting input terminal. The reference voltage Vref is input to the non-inverting input terminal of the first comparator 51, the envelope reference voltage ENVREF is input to the non-inverting input terminal of the second comparator 52, and the error detection reference voltage ERREF is input to the non-inverting input terminal of the third comparator 53.
[0095] The logic section 61 receives the comparison signal ZECMP output from the first comparator 51, the comparison signal ENVCMP output from the second comparator 52, and the comparison signal ERCMP output from the third comparator 53, respectively.
[0096] According to the configuration of the sensor signal processing device 201 of this comparative example, in the processing steps shown in Figures 5 to 7 described above, instead of switching the threshold voltages of the comparators in steps S21, S25, S28, and S35, the logic unit 61 refers to each comparison signal ZECMP, ENVCMP, and ERCMP, thereby enabling processing similar to that of this embodiment to be performed.
[0097] However, since the sensor signal processing device 201 according to the comparative example uses three comparators, the present embodiment using one comparator 5 can reduce the circuit area of the sensor signal processing device and can also reduce costs.
[0098] Furthermore, in the sensor signal processing device 201 according to the comparative example, it is necessary to match the delays of the three comparators so that they do not deviate relative to one another, which causes a problem of the comparator circuit itself becoming larger. In contrast, in the present embodiment, there is only one comparator, so there is no need to design taking into account the relative variation in delay, and the comparator circuit itself can be made smaller, and the range of options for the manufacturing process is also expanded. Note that even if there is a delay in the comparator of this embodiment, the delay is offset because the flow rate is calculated based on the difference in propagation time.
[0099] <5.Other> Although the embodiment of the present invention has been described above, various modifications of the embodiment are possible within the scope of the present invention. For example, the sensor system may use a sensor capable of transmitting and receiving a vibration signal other than ultrasonic waves. [Industrial Applicability]
[0100] The present invention can be used, for example, in an ultrasonic sensor system. [Explanation of symbols]
[0101] 101 1st ultrasonic sensor 102 Second ultrasonic sensor 200 Sensor signal processing device 300 Microcomputer 1 H-bridge circuit 2 I / V amplifier 3. 1st PGA 4. 2nd PGA 5. Comparator 6 Logic Section 7 Switch control circuit 8 Electronic Volume P1 Piping SW1~SW3 Switches R1~R7 resistance S1~S3 Switch M1 Monitor terminal Q1~Q8 Switch 11~14 Switch 51 First Comparator 52 Second Comparator 53 Third Comparator 61 Logic Section 201 Sensor signal processing device 500 Ultrasonic Sensor System
Claims
1. A sensor signal processing device that processes sensor signals output from a first sensor capable of transmitting and receiving a signal and a second sensor that is disposed downstream of the first sensor in a fluid flow and capable of transmitting and receiving a signal, a comparator having one input terminal receiving a signal based on the sensor signal; a first switch that switches whether or not a reference voltage for setting a zero-cross threshold voltage is applied to the other input terminal of the comparator; a second switch for switching whether or not an envelope reference voltage for setting an envelope threshold voltage is applied to the other input terminal; a third switch that switches whether or not an error detection reference voltage for setting an error detection threshold voltage is applied to the other input terminal; a control unit that performs switching control of the first switch, the second switch, and the third switch based on an output of the comparator; Equipped with a first voltage divider circuit for generating the envelope threshold voltage; a second voltage divider circuit that generates the error detection threshold voltage; the first voltage dividing circuit includes a first resistor for voltage division and a first switch connected in series to the first resistor; the second voltage dividing circuit includes a second resistor for voltage division and a second switch connected in series to the second resistor; the first switch and the second switch are switched on and off by an analog signal that is a power supply voltage of the comparator.
2. An amplifier for amplifying the sensor signal is further provided. The control unit is capable of switching the error detection reference voltage between two levels, The sensor signal processing device according to claim 1 , wherein the control unit adjusts a gain of the amplifier in response to an output of the comparator in a state in which the error detection reference voltage is applied to the other input terminal.
3. The sensor signal processing device according to claim 2 , wherein the control unit switches the error detection reference voltage by changing a voltage division ratio by switching whether or not to bypass both ends of a resistor.
4. 4. The sensor signal processing device according to claim 1, wherein the control unit calculates a propagation time between the first sensor and the second sensor based on a plurality of timings at which the signal input to the one input terminal crosses the zero-crossing threshold voltage.
5. the control unit applies the zero-cross threshold voltage to the other input terminal when the signal input to the one input terminal becomes equal to or greater than the envelope threshold voltage; When a signal input to the one input terminal becomes equal to or greater than the zero-cross threshold voltage, the error detection threshold voltage is applied to the other input terminal; The sensor signal processing device according to claim 4 , further comprising: a second input terminal connected to the first input terminal and a second input terminal connected to the second input terminal;
6. 6. The sensor signal processing device according to claim 1, wherein the control unit interrupts the process of performing the switching control if the signal input to the one input terminal does not become equal to or greater than the envelope threshold voltage before a certain period of time has elapsed.
7. an H-bridge circuit that drives the first sensor and the second sensor; a converter that converts the sensor signal output via the H-bridge circuit into a current / voltage signal, The sensor signal processing device according to claim 1 , wherein an output of the converter is input to the one input terminal.
8. The sensor signal processing device according to claim 1 , wherein the first sensor and the second sensor are ultrasonic sensors.
9. A sensor system comprising: the sensor signal processing device according to claim 1 ; the first sensor; and the second sensor.
Citation Information
Patent Citations
Ultrasonic flow meter
JP1997250939A
Ultrasonic flowmeter
JP1998142019A
Ultrasonic flowmeter
JP2002365110A
Ultrasonic flowmeter
JP2004157083A
Device of measuring flow velocity or flow rate
JP2010145213A
