Calculation device and calculation method
The computing device addresses the computational burden in ultrasonic flowmeters by extracting feature points and applying window functions to reduce data volume, facilitating accurate time difference calculations with small microcontrollers.
Patent Information
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2022-05-24
- Publication Date
- 2026-03-30
AI Technical Summary
Conventional ultrasonic flowmeters face challenges in accurately measuring propagation time differences due to noise and amplitude variations, requiring large computational loads that exceed the capabilities of small microcontrollers.
A computing device that extracts feature points from digital signals, applies a window function, performs Fourier transforms, and uses Hilbert transforms to derive time differences, reducing computational load by processing only a portion of the signal.
Reduces computational requirements, enabling accurate time difference calculations even with small microcontrollers, allowing for miniaturization, reduced power consumption, and improved measurement accuracy.
Smart Images

Figure 0007837217000001 
Figure 0007837217000002 
Figure 0007837217000003
Abstract
Description
Technical Field
[0001] The present disclosure relates to an arithmetic device and an arithmetic method for deriving the time difference between two signals.
Background Art
[0002] As one type of flowmeter, an ultrasonic flowmeter that utilizes the propagation time difference generated when ultrasonic waves propagate through a medium is known. The medium includes gases, liquids, and the like.
[0003] In this ultrasonic flowmeter, for example, as shown in FIG. 6, a first ultrasonic transceiver 3 is disposed on the upstream side in a flow path 2 through which a medium flows, and a second ultrasonic transceiver 4 is disposed on the downstream side in the flow path 2. Then, this ultrasonic flowmeter measures the flow velocity or flow rate of the medium flowing through the flow path 2 based on the difference (propagation time difference) between the propagation time of a first received signal that transmits ultrasonic waves from the upstream by the first ultrasonic transceiver 3 and receives them downstream by the second ultrasonic transceiver 4, and the propagation time of a second received signal that transmits ultrasonic waves from the downstream by the second ultrasonic transceiver 4 and receives them upstream by the first ultrasonic transceiver 3. In FIG. 6, the thick arrow indicates the traveling direction of the medium, and the thin arrow indicates the propagation direction of ultrasonic waves between the first ultrasonic transceiver 3 and the second ultrasonic transceiver 4.
[0004] In the measurement of this propagation time difference, measurement variations of sub-ns order or less may be required. On the other hand, since the ultrasonic waves used in ultrasonic flowmeters have frequencies on the order of several tens of kHz to several MHz, the period of a signal is on the order of 1 μs or more, and the period of the ultrasonic signal is much longer than the required measurement variations of the propagation time difference. The measurement variations of the propagation time difference are easily affected by noise and the like. Also, the amplitude of ultrasonic waves is affected by the flow velocity of the medium flowing through the flow path or the state of the medium. For this reason, in some cases, the arrival of ultrasonic waves is determined by setting a threshold value for the received signal. In this case, however, the arrival time measured when the amplitude of the received signal changes will also change.
[0005] On the other hand, the correlation method is a measurement method that is not affected by changes in the amplitude of the received signal. In the correlation method, the correlation between the first received signal and the second received signal is determined, and the propagation time difference is calculated from the peak position (maximum position) of this correlation. Since this correlation is obtained by digital signal processing, it is discretized at the same interval as the sampling period of the received signal.
[0006] Furthermore, among these correlation methods, the correlation method using the Hilbert transform is known as a method for achieving high-precision measurement. This correlation method using the Hilbert transform is a computational algorithm that enables the accurate calculation of the correlation peak position. In the following, this correlation using the Hilbert transform may also be referred to as "Hilbert correlation," a neologism combining Hilbert transform and cross-correlation.
[0007] Furthermore, regarding cross-correlation, which is the first part of Hilbert correlation, this section focuses on a method where the signals to be correlated are transformed into the frequency domain using Fourier transforms, then synthesized and subjected to inverse Fourier transforms. The following describes an example of the configuration of a conventional computing device that performs this Hilbert correlation.
[0008] As shown in Figure 7, the conventional computing device 1b includes an A / D conversion unit 101b, an A / D conversion unit 102b, a correlation calculation unit 103b, a Hilbert transform unit 104b, an inverse Fourier transform unit 105b, a phase relationship derivation unit 106b, and a time difference derivation unit 107b.
[0009] The A / D conversion unit 101b converts the first analog signal into a first digital signal by sampling it at a predetermined frequency. For example, when the computing device is applied to the ultrasonic flow meter shown in Figure 6, the first analog signal is a received signal transmitted by the first ultrasonic transceiver 3 located upstream of the flow path 2 and received by the second ultrasonic transceiver 4 located downstream. This first analog signal is a waveform signal that has periodicity and changes in amplitude.
[0010] For example, the A / D converter 101b receives a first analog signal, which is a time-series signal as shown in Figure 8A. Figure 8A shows a pseudo-signal of the received signal with a frequency of 1.32 MHz. Here, we assume a sampling frequency of 50 MHz (sampling period of 20 ns) and 1024 data points.
[0011] The A / D conversion unit 102b converts the second analog signal into a second digital signal by sampling it at a predetermined frequency. For example, when the computing device is applied to the ultrasonic flow meter shown in Figure 6, the second analog signal is a received signal transmitted by the second ultrasonic transceiver 4 located downstream of the flow path 2 and received by the first ultrasonic transceiver 3 located upstream. This second analog signal is a waveform signal that has periodicity and changes in amplitude. Furthermore, because this second analog signal is transmitted from downstream to upstream, it is delayed compared to the first analog signal due to the influence of the medium flowing through the flow path 2.
[0012] For example, the A / D converter 102b receives a second analog signal, which is a time-series signal as shown in Figure 8B. Figure 8B shows a pseudo-signal of the received signal with a frequency of 1.32 MHz. Here, we assume a sampling frequency of 50 MHz (sampling period of 20 ns) and 1024 data points. Furthermore, the second analog signal shown in Figure 8B is shifted by Δt in the time axis direction relative to the first analog signal shown in Figure 8A. That is, looking at the graph at the 10μs time axis, it can be seen that Figure 8B is shifted slightly to the right compared to Figure 8A. Note that Figure 8B shows the case where Δt = 15ns.
[0013] The correlation calculation unit 103b calculates the correlation between the first digital signal and the second digital signal based on the first digital signal, which is the conversion result of the A / D conversion unit 101b, and the second digital signal, which is the conversion result of the A / D conversion unit 102b. As shown in Figure 7, the correlation calculation unit 103b includes a Fourier transform unit 1031b, a Fourier transform unit 1032b, a complex conjugate derivation unit 1033b, a multiplier 1034b, and an inverse Fourier transform unit 1035b.
[0014] The Fourier transform unit 1031b performs a Fourier transform on the first digital signal, which is the result of the A / D conversion unit 101b, and outputs the value after the Fourier transform. In this case, the Fourier transform unit 1031b performs, for example, a Fast Fourier Transform (FFT) as the Fourier transform.
[0015] The Fourier transform unit 1032b performs a Fourier transform on the second digital signal, which is the result of the A / D conversion unit 102b, and outputs the value after the Fourier transform. In this case, the Fourier transform unit 1032b performs, for example, a Fast Fourier Transform (FFT) as the Fourier transform.
[0016] The complex conjugate derivation unit 1033b derives the complex conjugate of a value based on the value obtained after the Fourier transform by the Fourier transform unit 1031b.
[0017] The multiplier 1034b multiplies the complex conjugate derived by the complex conjugate derivation unit 1033b by the value obtained after the Fourier transform by the Fourier transform unit 1032b, and outputs the multiplied value.
[0018] The inverse Fourier transform unit 1035b performs an inverse Fourier transform on the value after multiplication by the multiplier 1034b and outputs the value after the inverse Fourier transform. The value obtained after the inverse Fourier transform by this inverse Fourier transform unit 1035b represents the correlation between the first digital signal and the second digital signal.
[0019] The output of the correlation calculation unit 103b (the value after transformation by the inverse Fourier transform unit 1035b) is, for example, the waveform shown by the solid line in Figure 9.
[0020] The Hilbert transform unit 104b performs a frequency domain Hilbert transform on the value obtained after multiplication by the multiplier 1034b of the correlation calculation unit 103b.
[0021] The inverse Fourier transform unit 105b performs an inverse Fourier transform on the value after the Hilbert transform by the Hilbert transform unit 104b, and outputs the value after the inverse Fourier transform.
[0022] The value after the conversion by this inverse Fourier transform unit 105b has a waveform indicated by a broken line in, for example, FIG. 9. This waveform indicated by the broken line is phase-shifted by 90° with respect to the waveform indicated by the solid line.
[0023] The phase relationship derivation unit 106b derives the phase relationship between the first digital signal and the second digital signal based on the output value of the correlation operation unit 103b (the value after the inverse Fourier transform by the inverse Fourier transform unit 1035b) and the value after the inverse Fourier transform by the inverse Fourier transform unit 105b. At this time, the phase relationship derivation unit 106b obtains the phase by using the inverse tangent function for the value after the inverse Fourier transform by the inverse Fourier transform unit 1035b and the value after the inverse Fourier transform by the inverse Fourier transform unit 105b. The phase relationship derived by this phase relationship derivation unit 106b corresponds to the phase relationship between the first analog signal and the second analog signal.
[0024] The phase relationship derived by this phase relationship derivation unit 106b has a waveform as shown in, for example, FIG. 10. That is, when the phase is obtained by using the inverse tangent function for the solid line waveform and the broken line waveform in FIG. 9, a waveform as shown in, for example, FIG. 10 is obtained.
[0025] The time difference derivation unit 107b derives the time difference (propagation time difference) between the first digital signal and the second digital signal based on the phase relationship derived by the phase relationship derivation unit 106b. The time difference derived by this time difference derivation unit 107b corresponds to the time difference (propagation time difference) between the first analog signal and the second analog signal.
[0026] That is, in FIG. 10, the point where the phase is 0 becomes the time difference to be obtained. In FIG. 10, there are a plurality of points where the phase is 0. However, according to another finding, if there are constraints on the time difference, it can be calculated by limiting it to only the time difference within that range. In FIG. 11A, among the waveforms shown in FIG. 10, the waveform in the case where the propagation time difference is limited to near 0 is enlarged and shown.
[0027] Also, the solid-line graph in FIG. 11A is obtained by linearly approximating using several points where the phase is near 0. Then, the intercept on the time difference axis where the phase is 0 can be obtained from the equation of this straight line, and this becomes the time difference to be obtained. In FIG. 11B, only the straight line obtained by linear approximation from FIG. 11A is shown. In the example of FIG. 11B, the equation of the straight line obtained by linear approximation is as shown in the following formula (1). In formula (1), θ represents the phase and Δt represents the time difference. θ = 0.12441 - 8.294×10 6 Δt (1) And when θ = 0, Δt becomes as shown in the following formula (2). Δt = 0.12441 / (8.294×10 6 ) = 15.000 [ns] (2) Therefore, it can be seen that it coincides with Δt at the time of signal generation.
Prior Art Documents
Patent Documents
[0028]
Patent Document 1
Summary of the Invention
Problems to be Solved by the Invention
[0029] As described above, the arithmetic unit 1b enables high-precision measurement. However, when using a correlation calculation method that employs the Fourier transform for cross-correlation, as in the conventional arithmetic unit 1b, the Fourier transform assumes that the beginning and end of the signal being transformed are connected and cyclical due to its characteristics. Therefore, the conventional arithmetic unit 1b may produce inappropriate results if there is a gap between the beginning and end of the target signal.
[0030] Therefore, conventional arithmetic unit 1b started from a no-signal state and calculated only from the point where the signal increased in size until it had sufficiently decayed. As a result, the amount of data to be calculated in this conventional arithmetic unit 1b became large, and in some cases, it became impossible to process with small microcontrollers that are subject to memory limitations.
[0031] For example, in the conventional arithmetic unit 1b, as shown in Figure 8, accurate calculations can be performed if the time difference can be calculated using the period from when the target waveform is small, when it becomes large, and when it becomes small again. Here, using the waveform shape shown in Figure 8, Figure 12 shows the time difference calculation error when the time difference between the two waveforms is varied.
[0032] Figure 12 shows that the error (on the order of 100 fs = 0.1 ps) is much smaller than the desired time difference (on the order of several nanoseconds), indicating that the calculation is performed with good accuracy. However, performing such calculations requires a large amount of data, which can be a heavy burden on small microcontrollers.
[0033] This disclosure was made to solve the above-mentioned problems and aims to provide a computing device that can reduce the amount of computation compared to conventional devices. [Means for solving the problem]
[0034] The computing device according to this disclosure includes: a first feature point extraction unit that extracts feature points from a first digital signal based on the first digital signal; a second feature point extraction unit that extracts feature points from a second digital signal based on the second digital signal; a first extraction unit that extracts a predetermined range of digital signals including the feature points from the first digital signal based on the feature points extracted by the first feature point extraction unit; and a predetermined range of digital signals including the feature points from the second digital signal based on the feature points extracted by the second feature point extraction unit. A second extraction unit extracts a digital signal within a certain range; a first multiplier multiplies the digital signal extracted by the first extraction unit by a window function and outputs the multiplied value; a second multiplier multiplies the digital signal extracted by the second extraction unit by a window function and outputs the multiplied value; a first Fourier transform unit performs a Fourier transform on the value multiplied by the first multiplier and outputs the Fourier transformed value; and a second Fourier transform unit performs a Fourier transform on the value multiplied by the second multiplier and outputs the Fourier transformed value. A complex conjugate derivation unit derives the complex conjugate of a value based on the value obtained after the Fourier transform by the Riever transform unit; a third multiplier multiplies the complex conjugate derived by the complex conjugate derivation unit with the value obtained after the Fourier transform by the second Fourier transform unit and outputs the multiplied value; a first inverse Fourier transform unit performs an inverse Fourier transform on the value obtained after the multiplication by the third multiplier and outputs the inverse Fourier transform value; a Hilbert transform unit performs a frequency domain Hilbert transform on the value obtained after the multiplication by the third multiplier; and an inverse Fourier transform on the value obtained after the Hilbert transform by the Hilbert transform unit. The system comprises: a second inverse Fourier transform unit that performs a transformation and outputs the value after the inverse Fourier transform; a phase relationship derivation unit that derives the phase relationship between the first digital signal and the second digital signal based on the value after the inverse Fourier transform by the first inverse Fourier transform unit and the value after the inverse Fourier transform by the second inverse Fourier transform unit; and a time difference derivation unit that derives the time difference between the first digital signal and the second digital signal based on the phase relationship derived by the phase relationship derivation unit, the cutting position in the first cutting unit, and the cutting position in the second cutting unit. The time difference derivation unit includes a linear approximation unit that performs linear approximation on the phase relationship derived by the phase relationship derivation unit, an intercept calculation unit that calculates the intercept of the point where the phase relationship becomes 0 for the result of the linear approximation by the linear approximation unit, and an adder that adds the value obtained by subtracting the cutting position in the first cutting unit from the cutting position in the second cutting unit to the intercept calculated by the intercept calculation unit, and outputs the value after multiplication. It is characterized by the following: [Effects of the Invention]
[0035] According to this disclosure, the configuration described above makes it possible to reduce the computational load compared to conventional methods. [Brief explanation of the drawing]
[0036] [Figure 1] This figure shows an example of the configuration of the computing device according to Embodiment 1. [Figure 2] This flowchart shows an example of the operation of the arithmetic unit according to Embodiment 1. [Figure 3] This figure shows an example of a signal extracted by the first extraction unit in Embodiment 1. [Figure 4] This figure shows an example of the signal after multiplication by the first multiplier in Embodiment 1. [Figure 5] This figure shows an example of the time difference calculation error in the calculation device according to Embodiment 1. [Figure 6] This figure shows an example of the configuration of an ultrasonic flowmeter. [Figure 7] This figure shows an example of a conventional computing device configuration. [Figure 8] Figure 8A shows an example of a signal input to one A / D conversion unit in a conventional arithmetic unit, and Figure 8B shows an example of a signal input to the other A / D conversion unit in a conventional arithmetic unit. [Figure 9] This figure shows an example of a transformation result obtained by two inverse Fourier transform units in a conventional computing device. [Figure 10] This figure shows an example of the derivation result obtained by the phase relationship derivation unit in a conventional computing device. [Figure 11] Figure 11A is a diagram showing a portion of the signals shown in Figure 10, and Figure 11B is a diagram showing the straight line obtained by linear approximation from Figure 11A. [Figure 12] This figure shows an example of a time difference calculation error in a conventional computing device. [Modes for carrying out the invention]
[0037] The embodiments will be described in detail below with reference to the drawings. Embodiment 1. Figure 1 shows an example of the configuration of the computing device 1 according to Embodiment 1. The calculation device 1 derives the time difference between two signals. This calculation device 1 can be applied, for example, to an ultrasonic flow meter. When the calculation device 1 is applied to an ultrasonic flow meter, it is configured to further include a functional unit (flow velocity deriving unit or flow rate deriving unit) that derives the time difference between two signals and, based on that time difference, can derive the flow velocity or flow rate of the medium flowing through the channel. Existing calculation methods can be applied to the method of calculating the flow velocity or flow rate of the medium using the above time difference.
[0038] As shown in Figure 1, this arithmetic unit 1 includes a first feature point extraction unit 101, a second feature point extraction unit 102, a first extraction unit 103, a second extraction unit 104, a window function setting unit 105, a first multiplier 106, a second multiplier 107, a correlation calculation unit 108, a Hilbert transform unit 109, a second inverse Fourier transform unit 110, a phase relationship derivation unit 111, and a time difference derivation unit 112.
[0039] The arithmetic unit 1 is implemented by a processing circuit such as a system LSI (Large Scale Integration), or a CPU (Central Processing Unit) that executes a program stored in memory, etc.
[0040] The first feature point extraction unit 101 extracts feature points from the first digital signal (first time-series signal) based on the first digital signal. Here, it is desirable that the feature points to be extracted by the first feature point extraction unit 101 be points that are easy to process and have a large amplitude, such as the maximum or minimum value.
[0041] For example, when the arithmetic unit 1 is applied to the ultrasonic flow meter shown in Figure 6, the first digital signal used by the first feature point extraction unit 101 is a digital signal obtained by A / D conversion (sampling at a predetermined frequency) of a first analog signal, which is a received signal transmitted by the first ultrasonic transceiver 3 located upstream of the flow path 2 and received by the second ultrasonic transceiver 4 located downstream. This first analog signal is a waveform signal that has periodicity and changes in amplitude.
[0042] The second feature point extraction unit 102 extracts feature points from the second digital signal (second time-series signal) based on the second digital signal. Here, it is desirable that the feature points to be extracted by the second feature point extraction unit 102 be points that are easy to process and have a large amplitude, such as the maximum or minimum value.
[0043] For example, when the arithmetic unit 1 is applied to the ultrasonic flow meter shown in Figure 6, the second digital signal used by the second feature point extraction unit 102 is a digital signal obtained by A / D conversion (sampling at a predetermined frequency) of a second analog signal, which is a received signal transmitted by the second ultrasonic transceiver 4 located downstream of the flow path 2 and received by the first ultrasonic transceiver 3 located upstream. This second analog signal is a waveform signal that has periodicity and changes in amplitude. Furthermore, since this second analog signal is transmitted from downstream to upstream, it is delayed compared to the first analog signal due to the influence of the medium flowing through the flow path 2.
[0044] The first extraction unit 103 extracts a predetermined range of digital signals from the first digital signal that includes the feature points extracted by the first feature point extraction unit 101. In this case, for example, the first extraction unit 103 extracts a predetermined range of digital signals centered on the feature points.
[0045] The second extraction unit 104 extracts a predetermined range of digital signals from the second digital signal that includes the feature points extracted by the second feature point extraction unit 102. In this case, for example, the second extraction unit 104 extracts a predetermined range of digital signals centered on the feature points.
[0046] The window function setting unit 105 sets the window function. The window function set by the window function setting unit 105 can be one that is commonly used in Fourier transforms, such as the Hann window.
[0047] The first multiplier 106 multiplies the digital signal extracted by the first extraction unit 103 by the window function set by the window function setting unit 105, and outputs the multiplied value.
[0048] The second multiplier 107 multiplies the digital signal extracted by the second extraction unit 104 by the window function set by the window function setting unit 105, and outputs the multiplied value.
[0049] The correlation calculation unit 108 calculates the correlation between the first digital signal and the second digital signal based on the value after multiplication by the first multiplier 106 and the value after multiplication by the second multiplier 107. As shown in Figure 1, the correlation calculation unit 108 includes a first Fourier transform unit 1081, a second Fourier transform unit 1082, a complex conjugate derivation unit 1083, a third multiplier 1084, and a first inverse Fourier transform unit 1085.
[0050] The first Fourier transform unit 1081 performs a Fourier transform on the value obtained by the first multiplier 106 and outputs the value after the Fourier transform. In the following description, the first Fourier transform unit 1081 will be described as performing a Fast Fourier Transform (FFT) as the Fourier transform, but it is not limited to this.
[0051] The second Fourier transform unit 1082 performs a Fourier transform on the value multiplied by the second multiplier 107 and outputs the value after the Fourier transform. In the following description, the second Fourier transform unit 1082 will be described as performing a Fast Fourier Transform (FFT) as the Fourier transform, but it is not limited to this.
[0052] The complex conjugate derivation unit 1083 derives the complex conjugate of a value based on the value obtained after the Fourier transform by the first Fourier transform unit 1081.
[0053] The third multiplier 1084 multiplies the complex conjugate derived by the complex conjugate derivation unit 1083 by the value obtained after the Fourier transform by the second Fourier transform unit 1082, and outputs the multiplied value.
[0054] The first inverse Fourier transform unit 1085 performs an inverse Fourier transform on the value after multiplication by the third multiplier 1084 and outputs the value after the inverse Fourier transform. In the following description, the first inverse Fourier transform unit 1085 will be described as performing a Fast Inverse Fourier Transform (IFFT) as the inverse Fourier transform, but it is not limited to this. The value obtained after the inverse Fourier transform by this first inverse Fourier transform unit 1085 represents the correlation between the first digital signal and the second digital signal.
[0055] The Hilbert transform unit 109 performs a frequency domain Hilbert transform on the value obtained after multiplication by the third multiplier 1084 of the correlation calculation unit 108.
[0056] The second inverse Fourier transform unit 110 performs an inverse Fourier transform on the value obtained by the Hilbert transform unit 109 and outputs the value obtained after the inverse Fourier transform. In the following description, the second inverse Fourier transform unit 110 will be described as performing a fast inverse Fourier transform (IFFT) as the inverse Fourier transform, but it is not limited to this.
[0057] The phase relationship derivation unit 111 derives the phase relationship between the first digital signal and the second digital signal based on the output value of the correlation calculation unit 108 (the value after the inverse Fourier transform by the first inverse Fourier transform unit 1085) and the value after the inverse Fourier transform by the second inverse Fourier transform unit 110. In this process, the phase relationship derivation unit 111 determines the phase by using an inverse tangent function on the value after the inverse Fourier transform by the first inverse Fourier transform unit 1085 and the value after the inverse Fourier transform by the second inverse Fourier transform unit 110.
[0058] Here, if we let c be the output value of the correlation calculation unit 108 (the value after the inverse Fourier transform by the first inverse Fourier transform unit 1085) and s be the value after the inverse Fourier transform by the second inverse Fourier transform unit 110, then the phase relationship (phase) θ of the digital signal extracted by the first extraction unit 103 and the digital signal extracted by the second extraction unit 104 is expressed by the following equation (3). θ = tan -1 (s / c) (3)
[0059] The time difference derivation unit 112 derives the time difference (propagation time difference) between the first digital signal and the second digital signal based on the phase relationship derived by the phase relationship derivation unit 111, the cutting position in the first cutting unit 103, and the cutting position in the second cutting unit 104. The time difference derived by this time difference derivation unit 112 corresponds to the time difference (propagation time difference) between the first analog signal and the second analog signal. As shown in Figure 1, the time difference derivation unit 112 includes a linear approximation unit 1121, an intercept calculation unit 1122, and an adder 1123.
[0060] The linear approximation unit 1121 performs a linear approximation on the phase relationship derived by the phase relationship derivation unit 111.
[0061] The intercept calculation unit 1122 calculates the intercept at the point where the phase relationship is zero for the result of the linear approximation by the linear approximation unit 1121 (the equation of the linear approximation obtained by the linear approximation unit 1121).
[0062] The adder 1123 adds the value obtained by subtracting the cutting position at the first cutting unit 103 from the cutting position at the second cutting unit 104 to the intercept calculated by the intercept calculation unit 1122, and outputs the added value. The output value from this adder 1123 becomes the time difference between the first digital signal and the second digital signal.
[0063] Here, let Δt' be the intercept (time difference) calculated by the intercept calculation unit 1122, let t1 be the cutting position in the first cutting unit 103, and let t2 be the cutting position in the second cutting unit 104. Then, Δt, which is the time difference between the first digital signal and the second digital signal, is expressed by the following equation (4). Δt = Δt' + (t2 - t1) (4)
[0064] Next, an example of the operation of the arithmetic unit 1 according to Embodiment 1 shown in Figure 1 will be explained with reference to Figure 2. The window function setting unit 105 sets the window function. In this case, the window function setting unit 105 sets the window function to, for example, a Han window.
[0065] In the example of operation of the arithmetic unit 1 according to Embodiment 1 shown in Figure 1, as shown in Figure 2, first, the first feature point extraction unit 101 and the second feature point extraction unit 102 extract feature points in the target digital signal based on the digital signal (step ST201). That is, the first feature point extraction unit 101 extracts feature points in the first digital signal based on the first digital signal. The second feature point extraction unit 102 extracts feature points in the second digital signal based on the second digital signal. Here, it is desirable to use points that are easy to process and have a large amplitude, such as the maximum or minimum value, as the feature points to be extracted by the first feature point extraction unit 101 and the second feature point extraction unit 102.
[0066] Next, the first extraction unit 103 and the second extraction unit 104 extract a predetermined range of digital signals containing feature points from the target digital signal (step ST202). That is, the first extraction unit 103 extracts a predetermined range of digital signals containing the feature points from the first digital signal based on the feature points extracted by the first feature point extraction unit 101. The second extraction unit 104 extracts a predetermined range of digital signals containing the feature points from the second digital signal based on the feature points extracted by the second feature point extraction unit 102. In this case, for example, the first extraction unit 103 and the second extraction unit 104 extract a predetermined range of digital signals centered on the feature points.
[0067] Next, the first multiplier 106 and the second multiplier 107 multiply the extracted digital signal by the window function set by the window function setting unit 105 and output the multiplied value (step ST203). That is, the first multiplier 106 multiplies the extracted digital signal by the first extraction unit 103 by the window function set by the window function setting unit 105 and outputs the multiplied value. The second multiplier 107 multiplies the extracted digital signal by the second extraction unit 104 by the window function set by the window function setting unit 105 and outputs the multiplied value.
[0068] Next, the correlation calculation unit 108 calculates the correlation between the first digital signal and the second digital signal based on the value after multiplication by the first multiplier 106 and the value after multiplication by the second multiplier 107 (step ST204).
[0069] In this process, the first Fourier transform unit 1081 first performs a Fourier transform on the value obtained by the first multiplier 106 and outputs the value after the Fourier transform. Furthermore, the second Fourier transform unit 1082 performs a Fourier transform on the value after multiplication by the second multiplier 107 and outputs the value after the Fourier transform.
[0070] Next, the complex conjugate derivation unit 1083 derives the complex conjugate of the value based on the value obtained after the Fourier transform by the first Fourier transform unit 1081. Next, the third multiplier 1084 multiplies the complex conjugate derived by the complex conjugate derivation unit 1083 by the value obtained after the Fourier transform by the second Fourier transform unit 1082, and outputs the multiplied value.
[0071] Next, the first inverse Fourier transform unit 1085 performs an inverse Fourier transform on the value after multiplication by the third multiplier 1084 and outputs the value after the inverse Fourier transform. The value obtained after the inverse Fourier transform by the first inverse Fourier transform unit 1085 represents the correlation between the digital signal extracted by the first extraction unit 103 and the digital signal extracted by the second extraction unit 104.
[0072] Furthermore, the Hilbert transform unit 109 performs a frequency domain Hilbert transform on the value obtained after multiplication by the third multiplier 1084 of the correlation calculation unit 108 (step ST205).
[0073] Next, the second inverse Fourier transform unit 110 performs an inverse Fourier transform on the value obtained by the Hilbert transform unit 109 and outputs the value obtained by the inverse Fourier transform (step ST206).
[0074] Next, the phase relationship derivation unit 111 derives the phase relationship between the digital signal extracted by the first extraction unit 103 and the digital signal extracted by the second extraction unit 104 based on the output value of the correlation calculation unit 108 (the value after the inverse Fourier transform by the first inverse Fourier transform unit 1085) and the value after the inverse Fourier transform by the second inverse Fourier transform unit 110 (step ST207). At this time, the phase relationship derivation unit 111 determines the phase according to equation (3).
[0075] Next, the time difference derivation unit 112 derives the time difference (propagation time difference) between the first digital signal and the second digital signal based on the phase relationship derivation unit 111, the cutting position in the first cutting unit 103, and the cutting position in the second cutting unit 104 (step ST208). This time difference derived by the time difference derivation unit 112 corresponds to the time difference (propagation time difference) between the first analog signal and the second analog signal.
[0076] In this process, the linear approximation unit 1121 first performs a linear approximation on the phase relationship derived by the phase relationship derivation unit 111. Next, the intercept calculation unit 1122 calculates the intercept of the point where the phase relationship becomes zero with respect to the result of the linear approximation by the linear approximation unit 1121.
[0077] Next, the adder 1123 adds the value obtained by subtracting the cutting position at the first cutting unit 103 from the cutting position at the second cutting unit 104 to the intercept calculated by the intercept calculation unit 1122 according to equation (4), and outputs the added value. This output value from the adder 1123 becomes the time difference between the first digital signal and the second digital signal.
[0078] In the conventional arithmetic unit 1b, accurate calculations can be performed by using the target waveform from a small point, increasing in size, and then decreasing again, as shown in Figure 8. However, performing such calculations requires a large amount of data, which can be burdensome for small microcontrollers. Therefore, the arithmetic unit 1 according to Embodiment 1 calculates the time difference using only a portion of the waveform shown in Figure 8. The following describes the case where the arithmetic unit 1 performs each process under the same conditions as the conventional arithmetic unit 1b (same conditions as in Figures 8-11).
[0079] For example, in the waveform shown in Figure 8, the peak at the minimum value is characteristic. Therefore, the first extraction unit 103 extracts a signal within a predetermined range centered on the minimum value, as shown in Figure 3, for example. Figure 3 shows the case where the first extraction unit 103 extracts 128 points centered on the point where the minimum value is taken (time-series waveform). Note that although each value is shown as a continuous value in Figure 3, they are actually discrete values. Also, the extraction position in the first extraction unit 103 is any position within the extracted range (for example, the position of the minimum value, which is a characteristic point). Similar to the first extraction unit 103, the second extraction unit 104 extracts 128 points from the second digital signal, centered around the minimum value. The extraction position in the second extraction unit 104 is any position within the extracted range (for example, the position of the minimum value, which is a feature point).
[0080] Note that the waveform shown in Figure 3 does not have values close to zero at the beginning and end. Therefore, if Hilbert correlation is performed on such a waveform, the Fourier transform is performed on a waveform where the beginning and end are forcibly joined in the first Fourier transform part (processing by the first Fourier transform unit 1081 and the second Fourier transform unit 1082), resulting in an inappropriate result. Therefore, in the arithmetic unit 1 according to Embodiment 1, an appropriate window function is applied before performing the Fourier transform. For example, a Hann window is used as the window function. Figure 4 shows an example of the result of multiplying the first digital signal shown in Figure 3 by a window function (Hann window). Note that although the values in Figure 4 are shown as continuous values, they are actually discrete values.
[0081] Furthermore, in the arithmetic unit 1 according to Embodiment 1, when the time difference between the waveforms of the two signals is changed for the signals that have undergone the above-described segmentation and window function processing, the time difference calculation error due to Hilbert correlation is as shown in Figure 5.
[0082] Here, since the waveform is extracted around the point where the minimum value of the two time-series waveforms is obtained, the extracted waveform is the same every 20ns, which is the sampling period, and it becomes a repeating function at the sampling period. Furthermore, although the data volume has been reduced to 128 points (1 / 8 of the original waveform's 1024 points), the error has only doubled, demonstrating the significant effect of the reduction in computational load.
[0083] Subsequently, the calculation device 1 according to Embodiment 1 corrects the propagation time difference considering the difference in the cutting position and determines the propagation time difference with respect to the original waveform before cutting.
[0084] Thus, in the arithmetic unit 1 according to Embodiment 1, only signals within a predetermined range, including feature points, are extracted and used from the first digital signal and the second digital signal, respectively. As a result, the arithmetic unit 1 according to Embodiment 1 can reduce the computational load by extracting only a portion of the signals from the first digital signal and the second digital signal, thereby reducing the amount of data, and can perform calculations with high accuracy even with a small amount of data. Therefore, because the arithmetic unit 1 according to Embodiment 1 can perform calculations with a small amount of data, it can also perform calculations on microcontrollers and the like that have limited memory capacity. In the first embodiment, the arithmetic unit 1 has a gap at the beginning and end of the extracted signal. This gap is eliminated by applying a window function to the extracted signal. In addition, the first embodiment calculates the time difference between the extracted signals and then corrects it using the time difference calculated based on the extraction position to calculate the time difference relative to the signal before extraction.
[0085] Furthermore, the calculation device 1 according to Embodiment 1 is a general-purpose technology and can be applied to a wide range of applications. For example, the calculation device 1 according to Embodiment 1 can be used to calculate the propagation time difference in an ultrasonic flow meter.
[0086] Furthermore, since the arithmetic unit 1 according to Embodiment 1 can perform calculations even with a small microcontroller, it becomes possible to miniaturize the device, reduce power consumption, and enable battery operation. Furthermore, the arithmetic unit 1 according to Embodiment 1 reduces the amount of computation, allowing for an increase in the number of measurements and calculations, and also enabling improvements in measurement accuracy through averaging and other means.
[0087] In the above explanation, the first feature point extraction unit 101 and the second feature point extraction unit 102 were described using the example of extracting the maximum or minimum value as a feature point in the target digital signal. However, the explanation is not limited to this, and the first feature point and the second feature point extraction unit 102 may also extract, for example, the point that first exceeds a predetermined fixed threshold, or the point that first exceeds a value that is a predetermined ratio to the maximum value, as a feature point in the target digital signal.
[0088] Furthermore, the above explanation described an example in which the first extraction unit 103 and the second extraction unit 104 extract a digital signal within a predetermined range centered on a feature point from the target digital signal. However, the extraction range is not limited to this, and does not necessarily have to be strictly a predetermined range centered on a feature point. For example, the first extraction unit 103 and the second extraction unit 104 may extract a range in which the feature point is located at the front 1 / 3 of the extraction range, depending on the waveform shape of the target digital signal.
[0089] Furthermore, the above explanation used the example of the window function setting unit 105 using a Hamming window as the window function. However, the window function setting unit 105 is not limited to this, and may use, for example, a Hamming window or a Blackman-Harris window as the window function.
[0090] As described above, according to this embodiment 1, the arithmetic unit 1 includes a first feature point extraction unit 101 that extracts feature points in the first digital signal based on the first digital signal, a second feature point extraction unit 102 that extracts feature points in the second digital signal based on the second digital signal, a first extraction unit 103 that extracts a predetermined range of digital signals including the feature points from the first digital signal based on the feature points extracted by the first feature point extraction unit 101, and a second digital A second extraction unit 104 extracts a digital signal within a predetermined range containing the feature point from the signal; a first multiplier 106 multiplies the digital signal extracted by the first extraction unit 103 by a window function and outputs the multiplied value; a second multiplier 107 multiplies the digital signal extracted by the second extraction unit 104 by a window function and outputs the multiplied value; a first Fourier transform unit 1081 performs a Fourier transform on the value multiplied by the first multiplier 106 and outputs the value after the Fourier transform; and a fourth multiplier unit performs a Fourier transform on the value multiplied by the second multiplier 107. A second Fourier transform unit 1082 outputs the value after the Fourier transform; a complex conjugate derivation unit 1083 derives the complex conjugate of the value based on the value after the Fourier transform by the first Fourier transform unit 1081; a third multiplier 1084 multiplies the complex conjugate derived by the complex conjugate derivation unit 1083 with the value after the Fourier transform by the second Fourier transform unit 1082 and outputs the multiplied value; a first inverse Fourier transform unit 1085 performs an inverse Fourier transform on the value after the multiplication by the third multiplier 1084 and outputs the inverse Fourier transform value; and a frequency function is applied to the value after the multiplication by the third multiplier 1084. A Hilbert transform unit 109 performs a Hilbert transform in the wavenumber domain; a second inverse Fourier transform unit 110 performs an inverse Fourier transform on the value obtained by the Hilbert transform unit 109 and outputs the value obtained by the inverse Fourier transform; a phase relationship derivation unit 111 derives the phase relationship between the first digital signal and the second digital signal based on the value obtained by the inverse Fourier transform unit 1085 and the value obtained by the second inverse Fourier transform unit 110; and the phase relationship derived by the phase relationship derivation unit 111, the extraction position in the first extraction unit 103, andThe arithmetic unit 1 of the first embodiment includes a time difference derivation unit 112 that derives the time difference between the first digital signal and the second digital signal based on the cutting position in the second cutting unit 104. This allows the arithmetic unit 1 of the first embodiment to reduce the computational load compared to conventional systems.
[0091] Furthermore, any component of the embodiment can be modified, or any component of the embodiment can be omitted. [Explanation of Symbols]
[0092] 1 Computing device 101 First Feature Point Extraction Unit 102 Second Feature Point Extraction Unit 103 First cutting section 104 Second cutting section 105 Window Function Setting Section 106 First Multiplier 107 Second Multiplier 108 Correlation Calculation Unit 109 Hilbert transformer 110 Second inverse Fourier transform section 111 Phase relationship derivation section 112 Time difference derivation section 1081 First Fourier Transform 1082 Second Fourier Transform 1083 Complex Conjugate Derivation Section 1084 The third multiplier 1085 First inverse Fourier transform 1121 Linear approximation part 1122 Intercept calculation part 1123 Adder
Claims
1. A first feature point extraction unit extracts feature points in a first digital signal based on the first digital signal, A second feature point extraction unit extracts feature points from a second digital signal based on the second digital signal, A first extraction unit extracts a predetermined range of digital signals containing the feature points from the first digital signal based on the feature points extracted by the first feature point extraction unit, A second extraction unit extracts a digital signal within a predetermined range containing the feature points extracted by the second feature point extraction unit from the second digital signal, based on the feature points extracted by the second feature point extraction unit. A first multiplier multiplies the digital signal extracted by the first extraction unit by a window function and outputs the multiplied value, A second multiplier multiplies the digital signal extracted by the second extraction unit by a window function and outputs the multiplied value, A first Fourier transform unit that performs a Fourier transform on the value multiplied by the first multiplier and outputs the value after the Fourier transform, A second Fourier transform unit performs a Fourier transform on the value multiplied by the second multiplier and outputs the value after the Fourier transform, A complex conjugate derivation unit derives the complex conjugate of a value based on the value obtained by the first Fourier transform unit, A third multiplier multiplies the complex conjugate derived by the complex conjugate derivation unit with the value obtained after the Fourier transform by the second Fourier transform unit, and outputs the multiplied value. A first inverse Fourier transform unit performs an inverse Fourier transform on the value multiplied by the third multiplier and outputs the value after the inverse Fourier transform, A Hilbert transform unit that performs a frequency domain Hilbert transform on the value after multiplication by the third multiplier, A second inverse Fourier transform unit performs an inverse Fourier transform on the value obtained after the Hilbert transform by the Hilbert transform unit and outputs the value obtained after the inverse Fourier transform, A phase relationship derivation unit derives the phase relationship between a first digital signal and a second digital signal based on the values obtained after the inverse Fourier transform by the first inverse Fourier transform unit and the values obtained after the inverse Fourier transform by the second inverse Fourier transform unit. The system includes a time difference derivation unit that derives the time difference between a first digital signal and a second digital signal based on the phase relationship derived by the phase relationship derivation unit, the cutting position in the first cutting unit, and the cutting position in the second cutting unit. The aforementioned time difference derivation unit is, A linear approximation unit performs linear approximation on the phase relationship derived by the phase relationship derivation unit, An intercept calculation unit calculates the intercept of the point where the phase relationship becomes zero for the result of linear approximation by the linear approximation unit, The system includes an adder that adds the value obtained by subtracting the cutting position in the first cutting unit from the cutting position in the second cutting unit to the intercept calculated by the intercept calculation unit, and outputs the multiplied value. A computing device characterized by the following features.
2. The first feature point extraction unit extracts the maximum or minimum value in the first digital signal based on the first digital signal. The second feature point extraction unit extracts the maximum or minimum value in the second digital signal based on the second digital signal. The arithmetic device according to claim 1, characterized by its features.
3. The first extraction unit extracts a digital signal within a predetermined range centered on the feature point from the first digital signal, based on the feature point extracted by the first feature point extraction unit. The second extraction unit extracts a digital signal within a predetermined range centered on the feature point from the second digital signal, based on the feature point extracted by the second feature point extraction unit. The arithmetic device according to claim 1, characterized by its features.
4. The window function is either a Hann window, a Hamming window, or a Blackman-Harris window. The arithmetic device according to claim 1, characterized by its features.
5. The first feature point extraction unit extracts feature points in the first digital signal based on the first digital signal, The second feature point extraction unit extracts feature points in the second digital signal based on the second digital signal, The first extraction unit extracts a predetermined range of digital signals containing the feature points from the first digital signal based on the feature points extracted by the first feature point extraction unit, The second extraction unit extracts a predetermined range of digital signals containing the feature points from the second digital signal based on the feature points extracted by the second feature point extraction unit, The first multiplier multiplies the digital signal extracted by the first extraction unit by a window function and outputs the multiplied value, The second multiplier multiplies the digital signal extracted by the second extraction unit by a window function and outputs the multiplied value, The first Fourier transform unit performs a Fourier transform on the value multiplied by the first multiplier and outputs the value after the Fourier transform. The second Fourier transform unit performs a Fourier transform on the value multiplied by the second multiplier and outputs the value after the Fourier transform. The complex conjugate derivation unit derives the complex conjugate of a value based on the value obtained by the first Fourier transform unit, The third multiplier multiplies the complex conjugate derived by the complex conjugate derivation unit by the value obtained after the Fourier transform by the second Fourier transform unit, and outputs the multiplied value. The first inverse Fourier transform unit performs an inverse Fourier transform on the value multiplied by the third multiplier and outputs the value after the inverse Fourier transform, The Hilbert transform unit performs a frequency domain Hilbert transform on the value after multiplication by the third multiplier, The second inverse Fourier transform unit performs an inverse Fourier transform on the value obtained by the Hilbert transform unit and outputs the value obtained by the inverse Fourier transform. The phase relationship derivation unit derives the phase relationship between the first digital signal and the second digital signal based on the values obtained after the inverse Fourier transform by the first inverse Fourier transform unit and the values obtained after the inverse Fourier transform by the second inverse Fourier transform unit. The time difference derivation unit includes the step of deriving the time difference between the first digital signal and the second digital signal based on the phase relationship derived by the phase relationship derivation unit, the cutting position in the first cutting unit, and the cutting position in the second cutting unit. The aforementioned time difference derivation unit is, The linear approximation unit performs a linear approximation on the phase relationship derived by the phase relationship derivation unit, The intercept calculation unit performs the step of calculating the intercept of the point where the phase relationship becomes zero with respect to the result of the linear approximation by the linear approximation unit, The adder has the step of adding to the intercept calculated by the intercept calculation unit the value obtained by subtracting the cutting position in the first cutting unit from the cutting position in the second cutting unit, and outputting the multiplied value. A calculation method characterized by the following.
Citation Information
Patent Citations
Method and apparatus for generation of pulse data, method and apparatus for generation of shape data, as well as apparatus for generation of transmission pulse signal
JP2002181921A
Calculating device and flow meter equipped with calculating device
JP2011180077A
Distance measuring device and distance measuring method
JP2020153671A