Method, device and electronic equipment for measuring vibration frequency of vibrating string sensor

By linearly fitting the data collected from the vibration frequency measurement of the vibrating sensor and combining the working frequency of the timer, the problem of poor anti-interference ability of the frequency measurement of the vibrating sensor is solved, and higher measurement accuracy and resolution are achieved.

CN118641021BActive Publication Date: 2025-05-06JIKANG INSTR BEIJING CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202410737746.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-07
Publication Date
2025-05-06
Estimated Expiration
2044-06-07

AI Technical Summary

Technical Problem

The anti-interference ability of the vibrating sensor frequency measurement is poor, resulting in poor measurement stability.

Method used

By acquiring N data pairs, including the acquisition sequence number of the trigger signal collected by the timer each time, a linear fit is performed to obtain the fitted linear slope, and the vibration frequency of the vibrating sensor is determined based on the operating frequency of the timer.

Benefits of technology

The anti-interference ability of vibrating frequency measurement of vibrating string sensors is improved, and the accuracy and resolution of frequency measurement are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118641021B_ABST
    Figure CN118641021B_ABST
Patent Text Reader

Abstract

The present application provides a method, device and electronic device for measuring the vibration frequency of a vibrating string sensor, and relates to the field of engineering monitoring technology, wherein the method comprises: obtaining N data pairs, wherein each of the N data pairs comprises a collection sequence number of each time the timer collects a trigger signal and a count value of the timer each time the trigger signal is collected, and the trigger signal is obtained by processing the vibration signal generated by the vibrating string sensor, and the vibration signal is generated by the vibrating string sensor under the action of an excitation source; performing linear fitting on the N data pairs to obtain the slope of the fitted straight line; determining the vibration frequency of the vibration signal generated by the vibrating string sensor according to the slope of the fitted straight line and the working frequency of the timer. The implementation of the technical solution provided by the present application solves the technical problem of poor anti-interference ability of the frequency measurement of the vibrating string sensor existing in the related art.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of engineering monitoring technology, and in particular to a method, device and electronic equipment for measuring the vibration frequency of a vibrating string sensor. Background Art

[0002] The vibrating string sensor is a sensor that measures stress, pressure, displacement and other parameters based on the change of its own natural frequency caused by the stress change of the steel string. The dedicated acquisition equipment of the vibrating string sensor obtains the frequency parameters of the sensor by exciting the steel string to vibrate itself and then collecting the vibration frequency of the steel string, and calculates the relevant stress, pressure and displacement parameters according to the vibration frequency. In the related art, the frequency of the steel string vibration is generally calculated by the equal precision measurement method, that is, the timer count is started from the first capture of the vibration signal, the number of signals is +1 after each capture of the vibration signal and the current timer count value is recorded, and then the timer count value of the last vibration signal capture is subtracted from the timer count value of the first vibration signal capture, and the difference of the timer count value is divided by the number of signals between the first vibration signal capture and the last vibration signal capture, and then the vibration frequency of the vibration signal is determined in combination with the working frequency of the timer. However, in the actual acquisition process, the frequency of the collected signal may be inconsistent due to the processing error of the internal structure of the sensor or the signal processing deviation of the acquisition circuit, that is, the anti-interference ability of the measurement method in the related art is not strong, and the measurement stability is poor.

[0003] With respect to the technical problem of poor anti-interference capability of frequency measurement of vibrating-string sensors existing in the related art, no effective solution has been proposed so far. Summary of the invention

[0004] The present application provides a method, device and electronic device for measuring the vibration frequency of a vibrating string sensor, so as to at least solve the technical problem of poor anti-interference ability of frequency measurement of the vibrating string sensor existing in the related art.

[0005] In a first aspect, the present application provides a method for measuring the vibration frequency of a vibrating string sensor, comprising: acquiring N data pairs, wherein each of the N data pairs includes an acquisition sequence number of each time a timer acquires a trigger signal and a count value of the timer each time the trigger signal is acquired, the trigger signal is obtained by processing a vibration signal generated by the vibrating string sensor, the vibration signal is generated by the vibrating string sensor under the action of an excitation source, and N is a positive integer greater than or equal to 2; performing linear fitting on the N data pairs to obtain a slope of a fitted straight line; and determining the vibration frequency of the vibration signal generated by the vibrating string sensor according to the slope of the fitted straight line and the operating frequency of the timer.

[0006] By adopting the above technical scheme, N data pairs are obtained, each of which includes a collection sequence number each time the timer collects (or captures) a trigger signal and a count value of the timer each time the trigger signal is collected, wherein the trigger signal is obtained by processing the vibration signal generated by the vibrating string sensor under the action of the excitation source. When the excitation source is applied to the vibrating string sensor, it will cause the vibrating string of the vibrating string sensor to generate a continuous vibration signal. The generated vibration signal is processed to obtain multiple trigger signals, and the timer records the corresponding collection sequence number and the count value of the timer each time it collects the trigger signal; linear fitting is performed on the N data pairs to obtain the slope of the fitted straight line, and then the vibration frequency of the vibration signal generated by the vibrating string sensor is obtained according to the slope of the fitted straight line and the working frequency of the timer, thereby avoiding the problem of poor anti-interference ability caused by the method in the related art of dividing the difference between the timer count value captured by the last vibration signal and the timer count value captured by the first vibration signal by the total number of captured signals, and then determining the vibration frequency of the vibration signal in combination with the working frequency of the timer, thereby achieving the purpose of improving the anti-interference ability of the vibration frequency measurement of the vibrating string sensor and achieving the effect of improving the accuracy and resolution of the frequency measurement.

[0007] Optionally, performing linear fitting on the N data pairs to obtain the slope of the fitted line includes: performing linear fitting on the N data pairs using a least squares method to obtain the slope of the fitted line.

[0008] By adopting the above technical solution, the least square method is used to perform linear fitting on N data pairs to obtain a fitted straight line, thereby obtaining the slope of the fitted straight line, thereby achieving the purpose of performing linear fitting on N data pairs.

[0009] Optionally, linear fitting is performed on N data pairs, including: judging whether the timer has any acquisition missing based on the N data pairs, wherein the acquisition missing is used to indicate that the timer has not captured one or more trigger signals; and when it is judged that the timer does not have any acquisition missing, linear fitting is performed on the N data pairs.

[0010] By adopting the above technical solution, it is judged whether the timer has collection missing according to N data pairs, that is, it is judged whether the timer has not captured the trigger signal, that is, it is judged whether the timer has missed capturing the trigger signal. When it is judged that the timer has no collection missing, linear fitting is performed on the N data pairs. The purpose of judging whether the timer has collection missing is achieved, and the purpose of improving the reliability of the collected N data pairs can be achieved, thereby achieving the effect of improving the accuracy of the frequency measurement of the vibrating string sensor.

[0011] Optionally, judging whether the timer has any collection missing based on N data pairs includes: obtaining N-1 initial cycle values ​​based on the N data pairs, wherein the i-th initial cycle value among the N-1 initial cycle values ​​is obtained based on the difference between the i+1-th count value and the i-th count value, the i-th count value is the count value included in the i-th data pair and corresponding to the collection sequence number i, the N data pairs include the i-th data pair, and i is a positive integer greater than or equal to 1 and less than N-1; determining a missing judgment value based on the N-1 initial cycle values; judging whether the timer has any collection missing based on the N-1 initial cycle values ​​and the missing judgment value.

[0012] By adopting the above technical solution, N-1 initial cycle values ​​can be obtained according to N data pairs, and then the missing judgment value can be determined according to the N-1 initial cycle values, and then the timer can be judged whether there is a collection missing according to the N-1 initial cycle values ​​and the missing judgment value. The missing judgment value can be used to judge whether there is data missing in the N data pairs, and then judge whether there is a collection missing in the timer. Through this technical solution, the purpose of judging whether the timer has a collection missing can be determined according to the N-1 initial cycle values ​​and the missing judgment value.

[0013] Optionally, judging whether the timer has collection missing is based on N-1 initial cycle values ​​and a missing judgment value, including: when the i-th initial cycle value is greater than or equal to the missing judgment value, judging that the timer has collection missing, wherein the missing judgment value is equal to the value obtained by multiplying the average cycle value by a preset coefficient, and the average cycle value is the average of the N-1 initial cycle values; when the N-1 initial cycle values ​​are all smaller than the missing judgment value, judging that the timer has no collection missing.

[0014] By adopting the above technical solution, the average cycle value, that is, the average value of N-1 initial cycle values, can be determined first, and the product of the average cycle value and the preset coefficient can be used as the missing judgment value, and then the i-th initial cycle value can be compared with the missing judgment value, and the i-th initial cycle value is any initial cycle value among the N-1 initial cycle values, that is, each initial cycle value among the N-1 initial cycle values ​​can be compared with the missing judgment value. When it is greater than or equal to the missing judgment value, it is judged that the timer has a collection missing, that is, when a certain initial value cycle value is greatly different from the average cycle value, it is considered that there may be data missing, that is, the timer may have a collection missing. The purpose of specifically judging whether the timer has a collection missing is achieved, thereby ensuring the reliability of the collected data pair.

[0015] Optionally, linear fitting is performed on the N data pairs, including: when the i-th initial period value is greater than or equal to the missing judgment value, interpolating the N data pairs to obtain N+1 data pairs; and linear fitting is performed on the N+1 data pairs.

[0016] By adopting the above technical solution, when the i-th initial period value is greater than or equal to the missing judgment value, N data pairs are interpolated to obtain N+1 data pairs, and then linear fitting is performed on the N+1 data pairs. The i-th initial period value is any one of the N-1 initial period values, that is, the N-1 initial period values ​​are judged, and when it is judged that there is a missing, the interpolation processing is performed according to the method. That is, when it is judged that the timer has a missing collection, the purpose of interpolating the N data pairs is adopted, the purpose of compensating for the missing data is achieved, and the purpose of improving the reliability of data collection is achieved.

[0017] Optionally, when the i-th initial cycle value is greater than or equal to the missing judgment value, N data pairs are interpolated to obtain N+1 data pairs, including: when the i-th initial cycle value is greater than or equal to the missing judgment value, a new count value is inserted between the i+1th count value and the i-th count value, and the collection sequence number of the new count value is i+1, and the collection sequence number corresponding to each count value between the i+1th count value to the Nth count value is increased by 1 to obtain N+1 data pairs, wherein the new count value is equal to half of the sum of the i+1th count value and the i-th count value.

[0018] By adopting the above technical solution, for any initial cycle value among the N-1 initial cycle values, such as the i-th initial cycle value, when the i-th initial cycle value is greater than or equal to the missing judgment value, a new count value is inserted between the i+1-th count value and the i-th count value, and the new count value can be set to be equal to half of the sum of the i+1-th count value and the i-th count value. The collection sequence number of the new count value is set to i+1, and the collection sequence number of each count value between the original i+1-th count value to the N-th count value is correspondingly increased by 1, so that N+1 data pairs can be obtained, thereby achieving the purpose of supplementing the missing data.

[0019] Optionally, the vibration frequency of the vibration signal generated by the vibrating string sensor is determined according to the slope of the fitted straight line and the operating frequency of the timer, including: determining the quotient between the operating frequency of the timer and the slope of the fitted straight line as the vibration frequency.

[0020] By adopting the above technical scheme, after the slope of the fitted straight line is determined, the vibration frequency of the vibration signal generated by the vibrating string sensor can be determined based on the slope of the fitted straight line and the operating frequency of the timer. Specifically, the vibration frequency can be obtained by dividing the operating frequency of the timer by the slope of the fitted straight line, thereby achieving the purpose of measuring the vibration frequency of the vibration signal generated by the vibrating string sensor.

[0021] In a second aspect of the present application, a device for measuring the vibration frequency of a vibrating string sensor is provided, comprising: an acquisition module for acquiring N data pairs, wherein each of the N data pairs comprises an acquisition sequence number of each time the timer acquires a trigger signal and a count value of the timer each time the trigger signal is acquired, the trigger signal is obtained by processing a vibration signal generated by the vibrating string sensor, the vibration signal is generated by the vibrating string sensor under the action of an excitation source, and N is a positive integer greater than or equal to 2; a processing module for performing linear fitting on the N data pairs to obtain a slope of a fitted straight line; and a determination module for determining the vibration frequency of the vibration signal generated by the vibrating string sensor according to the slope of the fitted straight line and the operating frequency of the timer.

[0022] In a third aspect of the present application, an electronic device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the program, any of the above method steps is implemented.

[0023] In a fourth aspect of the present application, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores instructions, and when the instructions are executed, any of the above method steps is performed.

[0024] In summary, one or more technical solutions provided in the embodiments of the present application have at least the following technical effects or advantages:

[0025] 1. The present invention avoids the problem of poor anti-interference ability caused by the method in the related art of dividing the difference between the timer count value of the last vibration signal captured and the timer count value of the first vibration signal captured by the total number of captured signals, and then determining the vibration frequency of the vibration signal in combination with the working frequency of the timer, thereby achieving the purpose of improving the anti-interference ability of the vibration frequency measurement of the vibrating string sensor and achieving the effect of improving the accuracy and resolution of frequency measurement.

[0026] 2. The purpose of judging whether there is any missing data collection in the timer is achieved, which can improve the reliability of the N data pairs collected, thereby achieving the effect of improving the accuracy of the frequency measurement of the vibrating string sensor.

[0027] 3. When it is determined that the timer has missing data, interpolation processing is performed on N data pairs to make up for the missing data and improve the reliability of data collection. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] Figure 1 It is a flow chart of a method for measuring the vibration frequency of a vibrating string sensor provided in an embodiment of the present application;

[0029] Figure 2It is a framework diagram of a frequency measurement system of a vibrating string sensor provided in an embodiment of the present application;

[0030] Figure 3 is an example diagram of a timer capturing signal provided in an embodiment of the present application;

[0031] Figure 4 This is an example diagram of linear fitting provided in an embodiment of the present application. DETAILED DESCRIPTION

[0032] In order to enable technicians in this field to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below in conjunction with the drawings in the embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this application, not all of the embodiments.

[0033] In the description of the embodiments of the present application, words such as "for example" or "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "for example" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "for example" or "for example" is intended to present related concepts in a specific way.

[0034] In the description of the embodiments of the present application, the meaning of the term "multiple" refers to two or more. For example, multiple systems refer to two or more systems, and multiple screen terminals refer to two or more screen terminals. In addition, the terms "first" and "second" are used for descriptive purposes only and cannot be understood as indicating or implying relative importance or implicitly indicating the indicated technical features. Thus, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. The terms "include", "comprise", "have" and their variations all mean "including but not limited to", unless otherwise specifically emphasized.

[0035] The present application provides a method for measuring the vibration frequency of a vibrating string sensor, referring to Figure 1 , Figure 1 1 is a flow chart of a method for measuring the vibration frequency of a vibrating string sensor provided in an embodiment of the present application, comprising the following steps:

[0036] Step S101, obtaining N data pairs, wherein each of the N data pairs includes a collection sequence number of each time a timer collects a trigger signal and a count value of the timer each time the trigger signal is collected, the trigger signal is obtained by processing a vibration signal generated by a vibrating string sensor, the vibration signal is generated by the vibrating string sensor under the action of an excitation source, and N is a positive integer greater than or equal to 2;

[0037] Step S102, performing linear fitting on N data pairs to obtain the slope of the fitted straight line;

[0038] Step S103, determining the vibration frequency of the vibration signal generated by the vibrating-string sensor according to the slope of the fitted straight line and the operating frequency of the timer.

[0039] The execution subject of the above steps may be a processor, an MCU, or a controller, but is not limited thereto.

[0040] In the above embodiment, N data pairs are obtained, each of which includes a collection sequence number of each time the timer collects (or captures) a trigger signal and a count value of the timer each time the trigger signal is collected, wherein the trigger signal is obtained by processing a vibration signal generated by the vibrating string sensor under the action of an excitation source. When the excitation source is applied to the vibrating string sensor, it causes the vibrating string of the vibrating string sensor to generate a continuous vibration signal, that is, to generate a vibration signal of multiple cycles. The generated vibration signal is processed to obtain multiple trigger signals. For example, the vibration signal is a sinusoidal signal, and the vibration signal is processed by a signal processing circuit to obtain a square wave signal or a triangular wave signal (or other signals). The trigger signal can be a square wave signal or a triangular wave signal. Taking a square wave signal as an example, at the rising edge or The falling edge will trigger the timer to collect the count value. The timer can collect (or capture) square wave signals, which is equivalent to capturing the aforementioned vibration signal. The vibration signal can be a signal with multiple cycles, so the timer can capture multiple square wave signals. The timer records the corresponding collection sequence number and the count value when the timer is triggered each time. For example, it can be stored in a register. In fact, the timer has been counting according to its own operating frequency, but it only records the count value and collection sequence number corresponding to each trigger, that is, each time the timer collects a trigger signal, it will record the corresponding collection sequence number and the count value of the timer; for example, the first data pair is (1, C1), where 1 represents the collection sequence number, and C1 represents the count value of the timer when the trigger signal with sequence number 1 is collected, and so on. N) represents the Nth data pair; linear fitting is performed on the N data pairs to obtain the slope of the fitted straight line, and then the vibration frequency of the vibration signal generated by the vibrating string sensor is obtained according to the slope of the fitted straight line and the working frequency of the timer, thereby avoiding the problem of poor anti-interference ability caused by the method in the related art of dividing the difference between the timer count value captured by the last vibration signal and the timer count value captured by the first vibration signal by the total number of captured signals, and then determining the vibration frequency of the vibration signal in combination with the working frequency of the timer. The method in the related art only focuses on the vibration signal captured for the first time and the vibration signal captured for the last time, but in fact, due to the processing error of the internal structure of the sensor or the signal processing deviation of the acquisition circuit, etc., it is easy to cause the frequency of the collected signal to be inconsistent, resulting in poor anti-interference ability of the method in the related art. The above embodiments of the present application can achieve the purpose of improving the anti-interference ability of vibration frequency measurement of vibrating string sensors.

[0041] In an optional embodiment, performing linear fitting on the N data pairs to obtain the slope of the fitted line includes: performing linear fitting on the N data pairs using a least squares method to obtain the slope of the fitted line.

[0042] In the above embodiment, the least square method can be used to perform linear fitting on N data pairs to obtain a fitted straight line, thereby obtaining the slope of the fitted straight line. The least square method is a commonly used linear fitting method. It determines the parameters of the straight line by minimizing the sum of the squares of the vertical distances from the data points to the fitted straight line. This method is widely used in statistics and data analysis. Through this embodiment, the purpose of performing linear fitting on N data pairs is achieved.

[0043] In an optional embodiment, linear fitting is performed on N data pairs, including: judging whether the timer has acquisition missing according to the N data pairs, wherein acquisition missing is used to indicate that the timer has not captured one or more trigger signals; and when it is judged that the timer does not have acquisition missing, linear fitting is performed on the N data pairs.

[0044] In the above embodiment, it is determined whether the timer has missing acquisitions based on N data pairs, that is, it is determined whether the timer has not captured a trigger signal. For example, within a preset time period, the vibrating string sensor generates a total of 100 cycles of vibration signals, but the timer only captures 99 (or 98, or other) trigger signals, that is, it is determined whether the timer has missed capturing a trigger signal. When it is determined that the timer has no missing acquisitions, linear fitting is performed on the N data pairs. The purpose of determining whether the timer has missing acquisitions is achieved, and the reliability of the N data pairs collected can be improved, thereby achieving the effect of improving the accuracy of the frequency measurement of the vibrating string sensor.

[0045] In an optional embodiment, judging whether the timer has a collection missing based on N data pairs includes: obtaining N-1 initial cycle values ​​based on the N data pairs, wherein the i-th initial cycle value among the N-1 initial cycle values ​​is obtained based on the difference between the i+1-th count value and the i-th count value, the i-th count value is the count value included in the i-th data pair and corresponding to the collection sequence number i, the N data pairs include the i-th data pair, i is a positive integer greater than or equal to 1 and less than N-1; determining a missing judgment value based on the N-1 initial cycle values; judging whether the timer has a collection missing based on the N-1 initial cycle values ​​and the missing judgment value.

[0046] In the above embodiment, N-1 initial cycle values ​​can be obtained based on N data pairs. For example, the difference between the i+1th count value and the ith count value is determined as the N-1th initial cycle value, and then the missing judgment value is determined based on the N-1 initial cycle value. For example, the missing judgment value can be a certain multiple of the average value of the N-1 initial cycle values, such as 1.5 times or 1.6 times, or other multiples. Then, based on the N-1 initial cycle values ​​and the missing judgment value, it is judged whether the timer has a collection missing. The missing judgment value can be used to judge whether there is data missing in the N data pairs, and then judge whether the timer has a collection missing. Through this embodiment, the purpose of judging whether the timer has a collection missing can be determined based on the N-1 initial cycle values ​​and the missing judgment value.

[0047] In an optional embodiment, it is determined whether the timer has a collection missing based on N-1 initial cycle values ​​and a missing judgment value, including: when the i-th initial cycle value is greater than or equal to the missing judgment value, it is determined that the timer has a collection missing, wherein the missing judgment value is equal to the value obtained by multiplying the average cycle value by a preset coefficient, and the average cycle value is the average of the N-1 initial cycle values; when the N-1 initial cycle values ​​are all less than the missing judgment value, it is determined that the timer has no collection missing.

[0048] In the above embodiment, the average cycle value, that is, the average value of N-1 initial cycle values, can be determined first, and the preset coefficient times (such as 1.5 times, or other) of the average cycle value is used as the missing judgment value, and then the i-th initial cycle value is compared with the missing judgment value, and the i-th initial cycle value is any initial cycle value among the N-1 initial cycle values, that is, each initial cycle value among the N-1 initial cycle values ​​is compared with the missing judgment value, and when it is greater than or equal to the missing judgment value, it is judged that the timer has a collection missing. It can be understood that when a certain initial value cycle value is greatly different from the average cycle value, it is considered that there may be data missing, that is, the timer may not capture the trigger signal, that is, the timer may have a collection missing. The purpose of specifically judging whether the timer has a collection missing is achieved, thereby ensuring the reliability of the collected data pair.

[0049] In an optional embodiment, linear fitting is performed on N data pairs, including: when the i-th initial period value is greater than or equal to the missing judgment value, interpolating the N data pairs to obtain N+1 data pairs; and linear fitting is performed on the N+1 data pairs.

[0050] In the above embodiment, when the i-th initial period value is greater than or equal to the missing judgment value, N data pairs are interpolated to obtain N+1 data pairs, and then linear fitting is performed on the N+1 data pairs. The i-th initial period value is any one of the N-1 initial period values, that is, the N-1 initial period values ​​are judged, and when it is judged that there is a missing, the interpolation process is performed according to the method. That is, when it is judged that the timer has a missing collection, the purpose of interpolating the N data pairs is adopted, the purpose of compensating for the missing data is achieved, and the purpose of improving the reliability of data collection is achieved.

[0051] In an optional embodiment, when the i-th initial cycle value is greater than or equal to the missing judgment value, N data pairs are interpolated to obtain N+1 data pairs, including: when the i-th initial cycle value is greater than or equal to the missing judgment value, a new count value is inserted between the i+1th count value and the i-th count value, and the collection sequence number of the new count value is i+1, and the collection sequence number corresponding to each count value between the i+1th count value to the Nth count value is increased by 1 to obtain N+1 data pairs, wherein the new count value is equal to half of the sum of the i+1th count value and the i-th count value.

[0052] In the above embodiment, for any initial cycle value among the N-1 initial cycle values, such as the i-th initial cycle value, when the i-th initial cycle value is greater than or equal to the missing judgment value, a new count value is inserted between the i+1-th count value and the i-th count value, and the new count value can be set to be equal to half of the sum of the i+1-th count value and the i-th count value. The collection sequence number of the new count value is set to i+1, and the collection sequence number of each count value between the original i+1-th count value to the N-th count value is correspondingly increased by 1, so that N+1 data pairs can be obtained, thereby achieving the purpose of supplementing the missing data.

[0053] In an optional embodiment, the vibration frequency of the vibration signal generated by the vibrating string sensor is determined based on the slope of the fitted straight line and the operating frequency of the timer, including: determining the quotient between the operating frequency of the timer and the slope of the fitted straight line as the vibration frequency.

[0054] In the above embodiment, after the slope of the fitted straight line is determined, the vibration frequency of the vibration signal generated by the vibrating string sensor can be determined based on the slope of the fitted straight line and the operating frequency of the timer, thereby achieving the purpose of measuring the vibration frequency of the vibrating string sensor.

[0055] It should be noted that the above-described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. The present application will be described in detail below in conjunction with specific embodiments.

[0056] In order to improve the acquisition effect of the string sensor, the present application proposes an acquisition calculation method that can accurately measure the frequency parameters of the vibrating string sensor and improve the acquisition accuracy, stability, resolution and anti-interference ability of the string sensor.

[0057] Different from the equal precision measurement method, the acquisition and calculation method of the embodiment of the present application is to record each capture count value of the vibration signal, stop capturing and calculate the data after reaching a certain number of capture times or a certain capture time, first find the difference of each capture count value, that is, calculate the difference between the capture count values ​​corresponding to the adjacent capture times, calculate the difference between the first capture count value and the second capture count value, the difference between the second count value and the third count value, the difference between the third count value and the fourth count value, and so on. The difference obtained is the period of each capture waveform (equivalent to the aforementioned initial period value), and then the period of all captured waveforms is averaged, and 1.5 times the average value is used as the standard (corresponding to the aforementioned missing judgment value). When the difference exceeds 1.5 times the average value, it is judged that the point is missing capture, and the original capture count value of the point is interpolated; after all interpolation processes are completed, all capture count values ​​are linearly fitted to calculate the slope, and the calculated slope can be used to calculate the frequency parameters of the frequency vibrating string sensor.

[0058] Among them, the number of captures or the capture time is variable, so it is written as a certain quantity. The evaluation criteria are based on practical experience. For example, based on experience, it can be set to a capture time of more than 200ms (or 100ms, or 50ms, or other values), or a capture number of more than 400 (or 300, or 500, or other) times.

[0059] Interpolation calculation method: determine whether there is a capture missing at this point, and insert the median value of the count values ​​of the two points before and after (interpolation processing).

[0060] Linear fitting method: Perform y=k*x+b linear regression calculation (least square method) on all processed capture count values, and the vibration frequency (or vibration period) of the vibration signal generated by the vibrating string sensor can be calculated based on the slope k.

[0061] Figure 2 is a framework diagram of a vibrating string sensor frequency measurement system provided in an embodiment of the present application, such as Figure 2 As shown, the signal processing circuit in the measurement system can process the vibration signal to obtain a trigger signal. For example, the trigger signal can be a square wave signal, a triangle wave signal, or other signals. The timer can capture the trigger signal, and the data calculation can be processed by the microcontroller MCU.

[0062] The following is an explanation with reference to a specific acquisition example. Table 1 includes the acquisition sequence number for each time and the count value captured by the timer for each time. Taking the acquisition sequence number 0 to 652 as an example, this application does not limit the number of acquisitions. The difference in the table represents the period of each captured waveform (the difference between two adjacent count values), as shown in Table 1.

[0063] Table 1

[0064]

[0065]

[0066] The vibrating string sensor can generate multiple cycles of vibration signals under the action of the excitation source, and the timer can also capture multiple trigger signals. Figure 3 is an example diagram of a timer capturing signal provided in an embodiment of the present application, Figure 3 The horizontal axis represents the acquisition sequence number, and the vertical axis represents the period of each waveform capture (that is, the difference between two adjacent count values).

[0067] Figure 4 This is a linear fitting example diagram provided in the embodiment of the present application. It should be noted that because the number of acquisitions is large, that is, the number of acquisition serial numbers is large, Figure 4 Only the count values ​​corresponding to some serial numbers are shown. Figure 4The horizontal axis represents the acquisition sequence number, and the vertical axis represents the count value corresponding to each acquisition sequence number.

[0068] The following is a description of the execution steps of the collection and calculation method of this application:

[0069] S1. When collecting the vibration frequency of the frequency vibrating string sensor, within the preset capture times or the preset capture time, the vibrating string sensor collector provided by this solution is used to convert the vibration signal into a square wave, and a timer is used to capture each vibration signal (square wave). A collection number is set for each vibration signal, and the timer capture count value corresponding to the collection number is read to obtain the mapping data of "collection number-timer capture count value", and the difference between the timer capture count values ​​between adjacent collection numbers is calculated as the period value of each captured waveform. Among them, the vibrating string sensor collector generally uses a comparator in the circuit to convert the vibration signal (sinusoidal signal) into a square wave for timer capture. The captured data in Excel is obtained by capturing the square wave signal when the timer is running at a frequency of 72M. Among them, the calculation process of this solution is generally realized by a single-chip microcomputer operating an internal or external timer to realize the entire function, and the data is also calculated by the single-chip microcomputer.

[0070] S2. Calculate the average value between each period value.

[0071] S3. Multiply the average value by a preset coefficient (such as 1.5) as the missing judgment value.

[0072] Among them, the missing judgment value is a standard for judging whether there is a capture missing. There are many ways to calculate this standard, and there is no specific limitation on this. For example, the value calculated by equal precision measurement (the period value of the vibration signal described in the background technology) multiplied by 1.5 can be used as the standard, or the middle value between the maximum period value and the minimum period value can be used as the standard (the effect is poor), or the period value obtained by directly performing a linear fit without interpolation processing and multiplying it by 1.5 can also be used as the standard.

[0073] S4. If the difference between the timer capture count values ​​with adjacent collection numbers is greater than the missing judgment value, calculate the median (such as (p+q) / 2) of the difference between the adjacent timer capture count values ​​(such as p, q), and insert the median between the adjacent timer capture count values, such as p, (p+q) / 2, q.

[0074] S5. Perform y=k*x+b univariate linear regression calculation (least square method) on each timer captured count value after the interpolation calculation in step S4 to obtain a slope k. Wherein, x is the timer captured value sequence number (sorted by capture order), y is the time value captured by the timer (sorted by capture order), and in practical applications, the time between two adjacent captures of the vibration signal can also be obtained based on the adjacent count values ​​captured by the timer and the working frequency (or period) of the timer itself, that is, the vibration period of the vibrating string sensor can be calculated.

[0075] S6. Calculate the frequency value f of the vibrating-string sensor using the slope k, where f=f0 / k, wherein f0 represents the operating frequency of the timer.

[0076] Table 2 shows the results of equal precision measurement, and Table 3 shows the results of linear fitting measurement using the embodiment of the present application.

[0077] Tables 2 and 3 are obtained based on the collected data of Table 1. It can be seen from Tables 2 and 3 that the advantages of the linear fitting measurement method of the present application over equal-precision measurement include: good stability, strong anti-interference ability, high resolution, etc.

[0078] Table 2

[0079]

[0080]

[0081] Table 3

[0082] Capture Points Linear fit slope Frequency calculation results 652 44159.044 1630.470 651 44159.040 1630.470 650 44159.034 1630.470 649 44159.032 1630.471

[0083] Through the embodiments of the present application, since the period is calculated using a linear fitting method, this algorithm has higher accuracy, stability and resolution than traditional equal-precision measurement methods, and can more accurately reflect the natural frequency of the sensor; the linear fitting method can be more stable and have strong anti-interference ability when the sensor vibration waveform is unstable (the amplitude of the period repeatedly deviates from the center frequency is large); capture missing judgment and interpolation compensation are added before calculation, which further improves the algorithm's anti-interference ability.

[0084] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in each embodiment of the present application.

[0085] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0086] In the several embodiments provided in this application, it should be understood that the disclosed devices can be implemented in other ways. For example, the device embodiments described above are only schematic, such as the division of units, which is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some service interfaces, and the indirect coupling or communication connection of devices or units can be electrical or other forms.

[0087] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0088] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0089] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable memory. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a memory and includes several instructions for a computer device (which can be a personal computer, server or network device, etc.) to perform all or part of the steps of the various embodiments of the present application. The aforementioned memory includes: various media that can store program codes, such as USB flash drives, mobile hard drives, magnetic disks or optical disks.

[0090] The above is only an exemplary embodiment of the present disclosure and cannot be used to limit the scope of the present disclosure. That is, any equivalent changes and modifications made according to the teachings of the present disclosure are still within the scope of the present disclosure. After considering the disclosure of the specification and the truth of practice, those skilled in the art will easily think of other embodiments of the present disclosure.

[0091] This application is intended to cover any modifications, uses or adaptations of the present disclosure, which follow the general principles of the present disclosure and include common knowledge or customary technical means in the technical field not recorded in the present disclosure.

Claims

1. A method for measuring the vibration frequency of a vibrating wire sensor, characterized in that: include: Acquire N data pairs, wherein each of the N data pairs includes a collection sequence number of each time a timer collects a trigger signal and a count value of the timer each time the trigger signal is collected, the trigger signal is obtained by processing a vibration signal generated by a vibrating string sensor, the vibration signal is generated by the vibrating string sensor under the action of an excitation source, and N is a positive integer greater than or equal to 2; Performing linear fitting on the N data pairs to obtain the slope of the fitted straight line; Determining the vibration frequency of the vibration signal generated by the vibrating-wire sensor according to the slope of the fitted straight line and the operating frequency of the timer; The performing of linear fitting on the N data pairs includes: judging whether the timer has acquisition missing according to the N data pairs, wherein the acquisition missing is used to indicate that the timer has not captured one or more of the trigger signals; and performing linear fitting on the N data pairs when it is judged that the timer does not have the acquisition missing; Judging whether the timer has a collection missing according to the N data pairs, comprising: obtaining N-1 initial cycle values ​​according to the N data pairs, wherein the i-th initial cycle value among the N-1 initial cycle values ​​is obtained according to the difference between the i+1-th count value and the i-th count value, the i-th count value is the count value included in the i-th data pair and corresponding to the collection sequence number i, the N data pairs include the i-th data pair, i is a positive integer greater than or equal to 1 and less than N-1; determining a missing judgment value according to the N-1 initial cycle values; judging whether the timer has a collection missing according to the N-1 initial cycle values ​​and the missing judgment value; Among them, determining the vibration frequency of the vibration signal generated by the vibrating string sensor according to the slope of the fitted straight line and the operating frequency of the timer includes: determining the quotient between the operating frequency of the timer and the slope of the fitted straight line as the vibration frequency.

2. The method according to claim 1, characterized in that: Performing linear fitting on the N data pairs to obtain the slope of the fitted straight line includes: The N data pairs are linearly fitted using the least square method to obtain the slope of the fitted straight line.

3. The method according to claim 1, characterized in that: Judging whether the timer has a collection missing according to the N-1 initial period values ​​and the missing judgment value includes: When the i-th initial period value is greater than or equal to the missing judgment value, it is determined that the timer has a collection missing, wherein the missing judgment value is equal to a value obtained by multiplying the average period value by a preset coefficient, and the average period value is the average of the N-1 initial period values; When the N-1 initial period values ​​are all smaller than the missing judgment value, it is determined that there is no collection missing for the timer.

4. The method according to claim 3, characterized in that Performing linear fitting on the N data pairs, comprising: When the i-th initial period value is greater than or equal to the missing judgment value, interpolation processing is performed on the N data pairs to obtain N+1 data pairs; A linear fit is performed on the N+1 data pairs.

5. The method according to claim 4, characterized in that When the i-th initial period value is greater than or equal to the missing judgment value, the N data pairs are interpolated to obtain N+1 data pairs, including: When the i-th initial cycle value is greater than or equal to the missing judgment value, a new count value is inserted between the i+1-th count value and the i-th count value, and the collection sequence number of the new count value is i+1. The collection sequence number corresponding to each count value between the i+1-th count value to the N-th count value is added by 1 to obtain the N+1 data pairs, wherein the new count value is equal to half of the sum of the i+1-th count value and the i-th count value.

6. A device for measuring the vibration frequency of a vibrating wire sensor, characterized in that: include: an acquisition module, configured to acquire N data pairs, wherein each of the N data pairs includes an acquisition sequence number of each time a timer acquires a trigger signal and a count value of the timer each time the trigger signal is acquired, wherein the trigger signal is obtained by processing a vibration signal generated by a vibrating string sensor, wherein the vibration signal is generated by the vibrating string sensor under the action of an excitation source, and N is a positive integer greater than or equal to 2; A processing module, used for performing linear fitting on the N data pairs to obtain a slope of a fitted straight line; A determination module, configured to determine the vibration frequency of the vibration signal generated by the vibrating-wire sensor according to the slope of the fitted straight line and the operating frequency of the timer; The processing module is used to perform linear fitting on the N data pairs in the following manner: judging whether the timer has acquisition missing according to the N data pairs, wherein the acquisition missing is used to indicate that the timer has not captured one or more of the trigger signals; and if it is judged that the timer does not have the acquisition missing, performing linear fitting on the N data pairs; The processing module is used to determine whether the timer has a collection missing according to the N data pairs in the following manner: obtain N-1 initial cycle values ​​according to the N data pairs, wherein the i-th initial cycle value among the N-1 initial cycle values ​​is obtained according to the difference between the i+1-th count value and the i-th count value, the i-th count value is the count value included in the i-th data pair and corresponding to the collection sequence number i, the N data pairs include the i-th data pair, i is a positive integer greater than or equal to 1 and less than N-1; determine a missing judgment value according to the N-1 initial cycle values; and determine whether the timer has a collection missing according to the N-1 initial cycle values ​​and the missing judgment value; The determination module is used to determine the vibration frequency of the vibration signal generated by the vibrating-wire sensor in the following manner: a quotient between the working frequency of the timer and the slope of the fitted straight line is determined as the vibration frequency.

7. An electronic device comprising a memory and a processor, wherein a computer program is stored in the memory, wherein: When the processor executes the program, the method according to any one of claims 1 to 5 is implemented.

Citation Information

Patent Citations

  • Frequency measurement method, device and equipment of multiple paths of vibrating wire sensors

    CN107462191A