Valve sensor, valve system and method for detecting state of valve

By using an inertial measurement unit consisting of a three-axis accelerometer, gyroscope, and magnetometer, combined with Kalman filtering and data fusion algorithms, the problem of low accuracy in existing valve sensors has been solved. This enables high-precision valve status detection and 3D motion trajectory detection, and also provides leakage detection and resistance to magnetic field interference.

CN120992187APending Publication Date: 2025-11-21MEASUREMENT SPECIALTIES CHINA +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410628581.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-20
Publication Date
2025-11-21

AI Technical Summary

Technical Problem

Existing valve sensors are not accurate enough, are prone to drift, cannot detect the 3D motion trajectory of valves, and cannot detect leaks.

Method used

An inertial measurement unit employing a three-axis accelerometer, gyroscope, and magnetometer, combined with Kalman filtering and data fusion algorithms, performs data processing and temperature compensation to reduce measurement errors, and possesses 3D motion trajectory detection and leakage detection capabilities.

Benefits of technology

It achieves high-precision, long-term stable valve condition detection, has 3D motion trajectory and wear detection capabilities, is resistant to environmental magnetic field interference, and has ultra-low power consumption.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120992187A_ABST
    Figure CN120992187A_ABST
Patent Text Reader

Abstract

The invention discloses a valve sensor for detecting the state of a valve. The valve sensor comprises an inertial measurement unit (100) and a data processing unit (200), wherein the inertial measurement unit (100) is used for collecting original motion data of a valve. The inertial measurement unit comprises a three-axis accelerometer (101), a three-axis gyroscope (102) and a three-axis magnetometer (103). The data processing unit comprises: a Kalman filtering module (201) configured to perform a Kalman filtering process on an acceleration value measured by the triaxial accelerometer, an angular velocity measured by the triaxial gyroscope, and magnetic field data measured by the triaxial magnetometer to filter noise signals; and a data fusion module (202) configured to fuse the data processed by the Kalman filtering process so that the corresponding acceleration value, angular velocity and magnetic field data are mutually compensated to reduce the error of the measurement result. The invention further discloses a valve system and a method for detecting the state of the valve through the valve sensor.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to a valve sensor, a valve system including the valve sensor, and a method for detecting the valve status using the valve sensor. Background Technology

[0002] Existing valve sensors, including one or two of gyroscopes, accelerometers, and magnetometers, suffer from low performance and accuracy, and are prone to drift. Current valve sensors cannot detect the 3D motion trajectory of a valve, but only its 2D rotation angle. Furthermore, current valve sensors cannot detect whether a valve is leaking. Summary of the Invention

[0003] This application is made in order to overcome at least one of the above-mentioned and other problems and defects existing in the prior art.

[0004] One aspect of this application provides a valve sensor for detecting the state of a valve. The valve sensor includes an inertial measurement unit and a data processing unit for acquiring raw motion data of the valve. The inertial measurement unit includes: a triaxial accelerometer configured to measure acceleration values ​​during valve motion; a triaxial gyroscope configured to measure the real-time angular velocity of the valve; and a triaxial magnetometer configured to measure magnetic field data of the valve. The data processing unit includes: a Kalman filtering module configured to perform a Kalman filtering process on the acceleration values ​​measured by the triaxial accelerometer, the angular velocity measured by the triaxial gyroscope, and the magnetic field data measured by the triaxial magnetometer to filter out noise signals; and a data fusion module configured to fuse the data processed by the Kalman filtering process so that the corresponding acceleration values, angular velocities, and magnetic field data compensate for each other to reduce measurement errors.

[0005] In some embodiments, the valve sensor may further include a temperature sensor for measuring ambient temperature data in real time, and the data processing unit further includes a temperature compensation module, wherein the temperature compensation module is configured to use the ambient temperature data (T) measured by the temperature sensor to perform temperature compensation on the acceleration value measured by the triaxial accelerometer, the angular velocity measured by the triaxial gyroscope, and the magnetic field data measured by the triaxial magnetometer, respectively.

[0006] Another aspect of this application provides a valve system. The valve system includes a valve and a valve sensor according to the foregoing aspects of this application, mounted on the valve.

[0007] Another aspect of this application provides a method for detecting the state of a valve using a valve sensor. The method includes: installing the valve sensor according to the above aspect of this application on the valve; measuring the acceleration value of the valve during movement using a triaxial accelerometer; measuring the real-time angular velocity of the valve using a triaxial gyroscope; measuring the magnetic field data of the valve using a triaxial magnetometer; performing a Kalman filtering process on the acceleration value measured by the triaxial accelerometer, the angular velocity measured by the triaxial gyroscope, and the magnetic field data measured by the triaxial magnetometer using a Kalman filtering module to filter out noise signals; and fusing the data processed by the Kalman filtering process using a data fusion module to compensate for the corresponding acceleration values, angular velocities, and magnetic field data to reduce measurement errors.

[0008] In some embodiments, the method may further include: measuring ambient temperature data in real time using a temperature sensor; and using a temperature compensation module to perform temperature compensation on the acceleration value measured by a triaxial accelerometer, the angular velocity measured by a triaxial gyroscope, and the magnetic field data measured by a triaxial magnetometer, respectively, so as to calculate the compensated angular velocity, the compensated acceleration value, and the compensated magnetic field data.

[0009] The valve sensor provided in this application uses an inertial measurement unit (IMU) comprising a triaxial accelerometer, a triaxial gyroscope, and a triaxial magnetometer to measure the valve's acceleration, angular velocity, and magnetic field data. Kalman filtering and data fusion algorithms are used to compensate for the measurement results of the triaxial accelerometer, gyroscope, and magnetometer, reducing measurement errors and thus giving the valve sensor high precision and high long-term stability. The valve sensor also includes a temperature sensor, which uses temperature to compensate for the measurement results of the triaxial accelerometer, gyroscope, and magnetometer, making the output results more stable. The valve sensor also has the capability to detect the valve's 3D motion trajectory, the wear degree of the valve and screw, and leak detection. Furthermore, the triaxial magnetometer and accelerometer work together to reduce the influence of ambient magnetic fields, providing strong resistance to environmental magnetic field interference. In addition, the valve sensor has a sleep / wake-up function, resulting in ultra-low power consumption.

[0010] Other objects and advantages of this application will become apparent from the following description of the application with reference to the accompanying drawings, and will help to provide a comprehensive understanding of the application. Attached Figure Description

[0011] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings of the embodiments will be briefly described below. It should be understood that the drawings described below only relate to some embodiments of this application and are not intended to limit this application. In the drawings:

[0012] Figure 1 A schematic block diagram of a valve system including a valve sensor according to this application is shown.

[0013] Figure 2 A flowchart illustrating a method for detecting valve status using a valve sensor according to an embodiment of this application is shown.

[0014] Figure 3 A flowchart illustrating the Kalman filtering process performed by the valve sensor according to this application is shown.

[0015] Figure 4 A flowchart is shown of a method for a valve sensor to detect valve status and send status data according to another embodiment of this application. Detailed Implementation

[0016] Embodiments of this application will be described below with reference to the accompanying drawings. The same reference numerals and symbols shown in the drawings refer to elements or components that perform substantially the same function.

[0017] Furthermore, the terminology used herein is for describing embodiments and is not intended to limit and / or constrain this application. Unless the context clearly indicates otherwise, the singular forms “a,” “an,” “the,” and “the” are also intended to include the plural forms. In this application, the terms “comprising,” “including,” “having,” and similar terms are used to enumerate features, quantities, steps, operations, elements, components, or combinations thereof, but do not exclude the presence or addition of one or more of said features, quantities, steps, operations, elements, components, or combinations thereof.

[0018] Although the terms “first,” “second,” “third,” etc., may be used herein to describe various different elements, these elements should not be limited by these terms. These terms are used only to distinguish one element from another. For example, without departing from the scope of this application, a first element may be referred to as a second element, and a second element may be referred to as a first element. The term “and / or” includes multiple combinations of associated items or any one of multiple associated items.

[0019] This application provides a valve sensor for detecting the state of valve 1. For example... Figure 1 and Figure 2As shown, the valve sensor may include an inertial measurement unit 100 and a data processing unit 200 for acquiring raw motion data of the valve. The inertial measurement unit 100 may include a triaxial accelerometer 101, a triaxial gyroscope 102, and a triaxial magnetometer 103. The triaxial accelerometer 101 is configured to measure the acceleration value of the valve during movement. The triaxial gyroscope 102 is configured to measure the real-time angular velocity of the valve. The triaxial magnetometer 103 is configured to measure the magnetic field data of the valve. The data processing unit 200 may include a Kalman filter module 201 and a data fusion module 202. The Kalman filter module 201 is configured to perform a Kalman filter process on the acceleration value measured by the triaxial accelerometer 101, the angular velocity measured by the triaxial gyroscope 102, and the magnetic field data measured by the triaxial magnetometer 103 to filter out noise signals. The data fusion module 202 is configured to fuse the data processed by the Kalman filter so that the corresponding acceleration values, angular velocities and magnetic field data compensate each other to reduce the error of the measurement results.

[0020] like Figure 1 As shown, the Kalman filter module 201 may further include a prediction module 2011 and an update module 2012, wherein the prediction module 2011 is used to predict the system state according to the state-space model, and the update module 2012 is used to update the system state according to the sensor measurements.

[0021] The Kalman filtering process can be divided into a prediction step and an update step. The prediction step predicts the system state based on the state-space model, while the update step updates the system state based on the sensor measurements.

[0022] like Figure 3 As shown, X0 is the initial state value, P k-1 K is the system covariance matrix at the previous time step, Q is the process noise covariance matrix, and K is the system covariance matrix at the previous time step. g Here, R is the Kalman gain, R is the covariance matrix of the measurement noise, and H is... k It is the detection parameter matrix, Z k X is the detection value at time K. k This is the optimal estimate at time K. Therefore, in the prediction step, the prior estimate of the current state can be calculated based on the state and state transition matrix of the previous time step; and the covariance matrix of the prior estimate can be calculated based on the variance of the process noise. In the update step, the estimate of the current measurement can be calculated based on the observation equation; the covariance matrix of the estimated measurement can be calculated based on the variance of the measurement noise; the Kalman gain can be calculated, and the posterior estimate of the current state can be calculated based on the Kalman gain; and the covariance matrix of the estimate can be updated using the posterior estimate.

[0023] In some embodiments, such as Figure 1 The prediction module 2011 shown can calculate the prior estimate of the current state based on the state and state transition matrix of the previous time step; and calculate the covariance matrix of the prior estimate based on the variance of the process noise.

[0024] In some embodiments, such as Figure 1 The update module 2012 shown can calculate the estimated value of the measurement at the current time according to the observation equation; calculate the covariance matrix of the estimated value of the measurement according to the variance of the measurement noise; calculate the Kalman gain and calculate the posterior estimate of the state at the current time according to the Kalman gain; and update the covariance matrix of the estimated value using the posterior estimate.

[0025] In some embodiments, such as Figure 1 The data fusion module 202 shown is configured to perform a fusion operation on the angular velocity, acceleration, and magnetic field data processed by the Kalman filter module 201 by executing the following algorithm:

[0026] Constrained Discrete State Equations:

[0027] X K =A K X K-1 +B K U K +W K

[0028] Among them, X K X represents the system state at time K; K-1 A represents the system state at the previous moment; K Matrix equations representing the evolutionary process; B K Represents the evolutionary equation; and U K Indicates the system input;

[0029] Obtain system measurement values:

[0030] Z K =HX k +V K

[0031] Among them, Z K H represents the measured value at time K; H represents the measurement system parameter matrix; W represents the measured value at time K. K Indicates process noise; and V K Indicates measurement noise;

[0032] Define the equation of state for each of the three-axis accelerometer 101, the three-axis gyroscope 102, and the three-axis magnetometer 103:

[0033]

[0034] Where, x k This represents the state vector of the sensor at time k; Represents the state transition matrix; Represents the system control matrix; Indicates control variables; This represents the dynamic noise at time k; This represents the measurement system parameter matrix; i represents one of the triaxial accelerometer, triaxial gyroscope, and triaxial magnetometer.

[0035] Define the target observation equations for each of the three-axis accelerometer 101, the three-axis gyroscope 102, and the three-axis magnetometer 103:

[0036]

[0037] in, Represents the target observation vector at time k; Represents the covariance matrix at time k; Represents the state vector at time k; Represents the measurement matrix; This represents the dynamic noise at time k; represents the observation noise at time k; i represents one of the three-axis accelerometer, three-axis gyroscope, and three-axis magnetometer.

[0038] Obtain the overall observation equations for the triaxial accelerometer 101, triaxial gyroscope 102, and triaxial magnetometer 103:

[0039]

[0040]

[0041]

[0042] in, This represents the target observation vector of the triaxial accelerometer at time k; This represents the target observation vector of the three-axis gyroscope at time k; This represents the target observation vector of the triaxial magnetometer at time k; Let represent the covariance matrix of the triaxial accelerometer at time k; Let represent the covariance matrix of the three-axis gyroscope at time k; Let represent the covariance matrix of the triaxial magnetometer at time k; This represents the observation noise of the triaxial accelerometer at time k; This represents the observation noise of the three-axis gyroscope at time k; This represents the observation noise of the triaxial magnetometer at time k;

[0043] Perform the fusion according to the following formula:

[0044]

[0045]

[0046]

[0047]

[0048] in, This represents the prior estimation error covariance matrix; This represents the posterior estimation error covariance matrix; represents the filtered state vector; i represents one of the three-axis accelerometer, three-axis gyroscope, and three-axis magnetometer.

[0049] The valve sensor of this application uses Kalman filtering and data fusion algorithms to compensate for the measurement results of the triaxial accelerometer, triaxial gyroscope and triaxial magnetometer to reduce the measurement error, which enables the valve sensor to have high precision and high long-term stability.

[0050] Furthermore, in some embodiments of this application, such as Figure 1 and Figure 2 As shown, the valve sensor may further include a temperature sensor 301 for measuring ambient temperature data in real time, and the data processing unit 200 further includes a temperature compensation module 203. The temperature compensation module 203 may be configured to use the ambient temperature data T measured by the temperature sensor 301 to perform temperature compensation on the acceleration value measured by the triaxial accelerometer 101, the angular velocity measured by the triaxial gyroscope 102, and the magnetic field data measured by the triaxial magnetometer 103, respectively.

[0051] Specifically, in some embodiments, the temperature compensation module 203 is configured to perform temperature compensation on the angular velocity, acceleration value, and magnetic field data using the following temperature compensation formula to calculate the compensated angular velocity Z. g The compensated acceleration value Z a and the compensated magnetic field data Z m :

[0052] Z g =y g -(a4T 4 +a3T 3 +a2T 2 +a1T+a0)

[0053] Z a =y a -(a9T 4 +a8T3 +a7T 2 +a6T+a5)

[0054] Z m =y m -(a 14 T 4 +a 13 T 3 +a 12 T 2 +a 11 T+a 10 )

[0055] Where T represents the ambient temperature data measured by the temperature sensor; a0 to a4 represent the temperature coefficients of the triaxial gyroscope; a5 to a9 represent the temperature coefficients of the triaxial accelerometer; a 10 To a 14 This represents the temperature coefficient of a triaxial magnetometer; y g Indicates the angular velocity before temperature compensation; y a This represents the acceleration value before temperature compensation; y m This represents the magnetic field data before temperature compensation; Z g Z represents the temperature-compensated angular velocity. a Z represents the acceleration value after temperature compensation. m This represents the magnetic field data after temperature compensation.

[0056] Therefore, in some embodiments, such as Figure 2 As shown, the Kalman filter module 201 uses the compensated angular velocity Z. g The compensated acceleration value Z a and the compensated magnetic field data Z m To perform the Kalman filtering process to filter out noise signals.

[0057] By using temperature compensation to adjust the measurement results of the triaxial accelerometer, triaxial gyroscope, and triaxial magnetometer, the output results can be made more stable.

[0058] However, it should be noted that the temperature sensor 301 and the temperature compensation module 203 are not essential, such as Figure 1 and Figure 2 As indicated by the dashed box. Therefore, in some embodiments of this application, the Kalman filter module 201 uses uncompensated angular velocity, acceleration values, and magnetic field data to perform a Kalman filtering process to filter out noise signals.

[0059] In some embodiments, such as Figure 1The data processing unit 200 shown may further include a state calculation module 204 for calculating the state of valve 1. The state calculation module 204 may be configured to: integrate the acceleration value processed by the data fusion module 202 over time to calculate the displacement of valve 1; and integrate the angular velocity processed by the data fusion module 202 over time to calculate the state angles θ, γ, and ψ of valve 1.

[0060] In some embodiments, the state calculation module 204 can be configured to calculate the state angles θ, γ, and ψ of valve 1 by executing the following algorithm:

[0061] The relationship between the state angular velocities of the three-axis gyroscope 102 along the x, y, and z axes and their angular velocities in the geographic coordinate system is defined by the following equations:

[0062]

[0063] Where, ω x ω y ω z C1 represents the state angular velocity of the three-axis gyroscope along the x, y, and z axes; C2 and C3 represent the constant drift of the three-axis gyroscope. θ and ψ are Euler angular velocities;

[0064] Calculate the Euler angular velocity using the following equation. θ, ψ:

[0065]

[0066]

[0067]

[0068] The valve's state, velocity, and position information can be calculated using quaternions using the following equation:

[0069]

[0070] in, and These represent the angular velocity components of the carrier coordinate system relative to the reference coordinate system along the x-axis, y-axis, and z-axis, respectively; Q(q0, q1, q2, q3) = q0 + q1i + q2j + q3k, where q0, q1, q2, and q3 are the four elements of a quaternion, all of which are real numbers, and i, j, and k are mutually orthogonal unit vectors;

[0071] The valve's state angles θ, γ, and ψ are calculated using the following equations:

[0072] θ=arcsin(2(q2q3+q0q2))

[0073]

[0074]

[0075] Among them, the valve's state angles θ, γ, and ψ include the pitch angle θ around the Y-axis, the roll angle γ around the X-axis, and the yaw angle ψ around the Z-axis.

[0076] In some embodiments, such as Figure 1 The data processing unit 200 shown may further include a trajectory fitting module 205 for fitting the 3D trajectory of the valve. The trajectory fitting module can be configured to fit the 3D trajectory of the valve using the following circular arc fitting formula:

[0077]

[0078]

[0079]

[0080] Where x represents the valve's x-axis coordinate; y represents the valve's y-axis coordinate; z represents the valve's z-axis coordinate; r represents the radius of the arc; α represents the starting angle of the fitted motion; θ represents the central angle; h1 represents the valve's ending height; and h2 represents the valve's starting height. Indicates the end angle of the valve; Indicates the initial angle of the valve; Indicates the current angle of the valve.

[0081] Therefore, the valve sensor of this application has the capability to detect the 3D motion trajectory of a valve. Based on this, the valve sensor of this application can detect the wear degree of the valve and the screw, as described in more detail below.

[0082] In some embodiments, such as Figure 1 As shown, the data processing unit 200 also includes a data storage module 206 and a microprogram controller 207. The data storage module can store the valve's arc radius, the valve's starting angle, the valve's initial 3D motion trajectory, and the magnetic field data of the valve after initial installation measured by a triaxial magnetometer. The microprogram controller 207 can be configured to obtain the valve's initial 3D motion trajectory from the data storage module 206 and set it as a reference value, and compare the reference value with the current 3D motion trajectory fitted by the trajectory fitting module 205.

[0083] In some embodiments, the microprogram controller 207 may be configured to determine that the valve is worn when the deviation between the reference value and the current 3D motion trajectory is greater than or equal to a deviation threshold.

[0084] When a valve leaks, the pressure difference between the inside and outside of the pipe at the leak point will generate vibrations of different frequencies, thus forming a leakage sound wave. This leakage sound wave will propagate in the air in the form of a longitudinal wave in a plane wave.

[0085] In some embodiments, such as Figure 1 As shown, the valve sensor may further include an acoustic sensor 302 for providing real-time ambient acoustic data, and the acoustic sensor 302 is configured to detect a leakage acoustic signal when the valve leaks, and to perform noise reduction processing on the detected leakage acoustic signal.

[0086] In addition, the data storage module 206 can also store historical data of the valve when it is not leaking. The microprogram controller 207 can be configured to compare the noise-reduced leakage acoustic signal received from the acoustic sensor 302 with the historical data of the valve when it is not leaking stored in the data storage module 203 to determine whether a leak has occurred.

[0087] Therefore, the valve sensor of this application also has leakage detection capability.

[0088] In some embodiments, such as Figure 1 As shown, the valve sensor also includes a low-power vibration sensor 303 for providing real-time vibration data. The data storage module 206 can also store vibration thresholds when the valve enters its operating state. The microprogrammed controller 202 can be configured to compare the current vibration data received from the low-power vibration sensor 303 with the vibration thresholds stored in the data storage module 203 to determine whether the valve is stationary or rotating.

[0089] In some embodiments, the microprogram controller 202 may also be configured to: induce the valve sensor to enter a sleep state to reduce power consumption when it is determined that the valve is in a stationary state; and induce the valve sensor to enter a working state to achieve a sleep-wake function when it is determined that the valve is in a rotating state.

[0090] Therefore, the valve sensor of this application also has a sleep wake-up function, thereby achieving ultra-low power consumption.

[0091] In some embodiments, such as Figure 1 As shown, the valve sensor may also include a wireless module 304 and a transmitting antenna 305. The wireless module 304, for example, is a LoRa WAN communication module, which can be used for data transmission between the valve sensor and the terminal system. The transmitting antenna 305 is connected to the wireless module 304 for transmitting and receiving valve status data.

[0092] The valve sensor provided in this application uses an inertial measurement unit (IMU) comprising a triaxial accelerometer, a triaxial gyroscope, and a triaxial magnetometer to measure the valve's acceleration, angular velocity, and magnetic field data. Kalman filtering and data fusion algorithms are used to compensate for the measurement results from the triaxial accelerometer, gyroscope, and magnetometer, reducing measurement errors and thus giving the valve sensor high precision and high long-term stability. The valve sensor also includes a temperature sensor, which uses temperature to compensate for the measurement results from the triaxial accelerometer, gyroscope, and magnetometer, making the output results more stable. The valve sensor also has the capability to detect the valve's 3D motion trajectory, the wear degree of the valve and screw, and leak detection. Furthermore, the triaxial magnetometer and accelerometer work together to reduce the influence of ambient magnetic fields, providing strong resistance to environmental magnetic field interference. In addition, the valve sensor has a sleep / wake-up function, resulting in ultra-low power consumption.

[0093] Another aspect of this application provides a valve system. The valve system includes a valve and a valve sensor according to the above embodiments of this application, mounted on the valve.

[0094] Therefore, the valve system of this application can have the same advantages as the valve sensor of this application.

[0095] Another aspect of this application provides a method for detecting the state of a valve using a valve sensor. Figure 2 A flowchart illustrating a method for detecting valve status using a valve sensor according to an embodiment of this application is shown.

[0096] The data acquisition step S30 may include measuring the acceleration value of the valve during movement using a triaxial accelerometer 101 (S31); measuring the real-time angular velocity of the valve using a triaxial gyroscope 102 (S32); and measuring the magnetic field data of the valve using a triaxial magnetometer 103 (S33).

[0097] In step S72, the Kalman filter module 201 performs a Kalman filtering process on the acceleration value measured by the triaxial accelerometer, the angular velocity measured by the triaxial gyroscope, and the magnetic field data measured by the triaxial magnetometer to filter out noise signals.

[0098] Preferably, the method may include a temperature compensation step S71 before step S72. In step S711, the ambient temperature data T is measured in real time by the temperature sensor 301. The temperature compensation module 203 uses the ambient temperature data T measured by the temperature sensor 301 to perform temperature compensation (S71) on the acceleration value measured by the triaxial accelerometer 101, the angular velocity measured by the triaxial gyroscope 102, and the magnetic field data measured by the triaxial magnetometer 103, respectively, to calculate the compensated angular velocity, the compensated acceleration value, and the compensated magnetic field data.

[0099] In step S73, the data processed by the Kalman filter is fused by the data fusion module 202 so that the corresponding acceleration values, angular velocities and magnetic field data compensate each other to reduce the error of the measurement results.

[0100] In step S80, the data after being fused by the data fusion module 202 can be used by the state calculation module 204 for state calculation, thereby calculating the state angle of the valve.

[0101] In addition, in step S90, the trajectory fitting module 205 can use the calculated state angle of the valve to fit the 3D motion trajectory of the valve.

[0102] Figure 4 A flowchart illustrating a method for a valve sensor to detect valve status and transmit status data according to another embodiment of this application is shown. In step S20, the valve sensor is initialized and configured. In steps S31, S32, and S33, raw data is acquired using a triaxial accelerometer 101, a triaxial gyroscope 102, and a triaxial magnetometer 103, respectively. Then, in steps S41, S42, and S43, the acquired raw data undergoes signal preprocessing to initially remove noise.

[0103] In step S51, it is determined whether the acceleration value measured by the triaxial accelerometer contains motion acceleration. If there is no motion acceleration, the state matrix is ​​calculated directly in step S61. If there is motion acceleration, the motion acceleration is separated or removed in step S511, and then the state matrix is ​​calculated in step S61.

[0104] In step S52, it is determined whether there is random magnetic interference in the magnetic field data measured by the triaxial magnetometer. If there is no random magnetic interference, the state matrix is ​​calculated directly in step S62. If there is random magnetic interference, the random magnetic interference is eliminated in step S521, and then the state matrix is ​​calculated in step S61.

[0105] In step S70, a Kalman filtering process and a data fusion process are performed. Preferably, a temperature compensation process is also performed.

[0106] Subsequently, in step S80, the data after data fusion can be used by the state calculation module to calculate the valve's state angle. Then, in step S90, the trajectory fitting module can use the calculated valve state angle to fit the valve's 3D motion trajectory. In step S100, state data such as the valve's 3D motion trajectory can be transmitted to the terminal system via the wireless module 304 and the transmitting antenna 305.

[0107] The method for detecting the state of a valve using a valve sensor in this application has the same advantages as the valve sensor in this application.

[0108] Those skilled in the art will understand that the embodiments described above are exemplary and can be improved upon. The structures described in the various embodiments can be freely combined without causing any conflict in structure or principle.

[0109] The above embodiments are merely illustrative of the principles and structure of this application and are not intended to limit this application. Those skilled in the art should understand that any changes and improvements made to this application without departing from the overall concept of this application are within the scope of this application. The scope of protection of this application should be determined by the scope defined in the claims of this application.

Claims

1. A valve sensor for detecting the state of a valve (1), characterized in that, The valve sensor includes an inertial measurement unit (100) and a data processing unit (200) for acquiring raw motion data of the valve. The inertial measurement unit (100) includes: A triaxial accelerometer (101) is configured to measure the acceleration value of the valve during its movement; A three-axis gyroscope (102) is configured to measure the real-time angular velocity of the valve; and A triaxial magnetometer (103) is configured to measure the magnetic field data of the valve; and The data processing unit (200) includes: A Kalman filter module (201) is configured to perform a Kalman filter process on the acceleration values ​​measured by the triaxial accelerometer (101), the angular velocity measured by the triaxial gyroscope (102), and the magnetic field data measured by the triaxial magnetometer (103) to filter out noise signals; and The data fusion module (202) is configured to fuse the data processed by the Kalman filtering process so that the corresponding acceleration values, angular velocities and magnetic field data compensate each other to reduce the error of the measurement results.

2. The valve sensor according to claim 1, wherein, The Kalman filter module (201) further includes: The prediction module (2011) is used to predict the system state based on the state-space model; and An update module (2012) is used to update the system state based on the sensor measurements.

3. The valve sensor according to claim 2, wherein, The prediction module (2011) is configured as follows: The prior estimate of the current state is calculated based on the state and state transition matrix of the previous time step. as well as The covariance matrix of the prior estimate is calculated based on the variance of the process noise.

4. The valve sensor according to claim 2, wherein, The update module (2012) is configured as follows: The estimated value of the measurement at the current moment is calculated based on the observation equation; The covariance matrix of the estimated measured values ​​is calculated based on the variance of the measurement noise. Calculate the Kalman gain, and use the Kalman gain to calculate the posterior estimate of the state at the current time. as well as The covariance matrix of the estimated value is updated using the posterior estimate.

5. The valve sensor according to claim 1, wherein, The data fusion module (202) is configured to perform a fusion operation on the angular velocity, acceleration, and magnetic field data processed by the Kalman filter module (201) by executing the following algorithm: Constrained Discrete State Equations: X K =A K X K-1 +B k ∪ k +W K Among them, X K X represents the system state at time K; K-1 A represents the system state at the previous moment; K Matrix equations representing the evolutionary process; B K Represents the evolutionary equation; and U K Indicates the system input; Obtain system measurement values: Z K =HX K +V K Among them, Z K H represents the measured value at time K; H represents the measurement system parameter matrix; W represents the measured value at time K. K Indicates process noise; and V K Indicates measurement noise; Define the state equations for each of the three-axis accelerometer (101), the three-axis gyroscope (102), and the three-axis magnetometer (103): Where, x k This represents the state vector of the sensor at time k; Represents the state transition matrix; Represents the system control matrix; Indicates control variables; This represents the dynamic noise at time k; This represents the measurement system parameter matrix; i represents one of the three-axis accelerometer, the three-axis gyroscope, and the three-axis magnetometer. Define the target observation equation for each of the three-axis accelerometer (101), the three-axis gyroscope (102), and the three-axis magnetometer (103): in, Represents the target observation vector at time k; Represents the covariance matrix at time k; Represents the state vector at time k; Represents the measurement matrix; This represents the dynamic noise at time k; The noise observed at time k represents the noise level; i represents one of the three-axis accelerometer, the three-axis gyroscope, and the three-axis magnetometer. Obtain the overall observation equations for the triaxial accelerometer (101), the triaxial gyroscope (102), and the triaxial magnetometer (103): in, This represents the target observation vector of the triaxial accelerometer at time k; This represents the target observation vector of the three-axis gyroscope at time k; This represents the target observation vector of the triaxial magnetometer at time k; This represents the covariance matrix of the triaxial accelerometer at time k; This represents the covariance matrix of the three-axis gyroscope at time k; This represents the covariance matrix of the triaxial magnetometer at time k; This represents the observation noise of the triaxial accelerometer at time k; This represents the observation noise of the three-axis gyroscope at time k; This represents the observation noise of the triaxial magnetometer at time k; The fusion is performed according to the following formula: in, This represents the prior estimation error covariance matrix; This represents the posterior estimation error covariance matrix; represents the filtered state vector; i represents one of the three-axis accelerometer, the three-axis gyroscope, and the three-axis magnetometer.

6. The valve sensor according to claim 1, wherein, The valve sensor also includes a temperature sensor (301) for real-time measurement of ambient temperature data, and the data processing unit (200) further includes a temperature compensation module (203). The temperature compensation module (203) is configured to use the ambient temperature data (T) measured by the temperature sensor (301) to perform temperature compensation on the acceleration value measured by the triaxial accelerometer (101), the angular velocity measured by the triaxial gyroscope (102), and the magnetic field data measured by the triaxial magnetometer (103).

7. The valve sensor according to claim 6, wherein, The temperature compensation module (203) is configured to perform temperature compensation on the angular velocity, the acceleration value, and the magnetic field data using the following temperature compensation formula to calculate the compensated angular velocity (Z). g ), the compensated acceleration value (Z) a ) and the compensated magnetic field data (Z m ): Z g =y g -(a4T 4 +a3T 3 +a2T 2 +a1T+a0) Z a =y a -(a9T 4 +a8T 3 +a7T 2 +a6T+a5) Z m =y m -(a 14 T 4 +a 13 T 3 +a 12 T 2 +a 11 T+a 10 ) Where T represents the ambient temperature data measured by the temperature sensor; a0 to a4 represent the temperature coefficients of the triaxial gyroscope; a5 to a9 represent the temperature coefficients of the triaxial accelerometer; a 10 To a 14 This represents the temperature coefficient of a triaxial magnetometer; y g Indicates the angular velocity before temperature compensation; y a This represents the acceleration value before temperature compensation; y m This represents the magnetic field data before temperature compensation; Z g Z represents the temperature-compensated angular velocity. a Z represents the acceleration value after temperature compensation. m This represents the magnetic field data after temperature compensation.

8. The valve sensor according to claim 7, wherein, The Kalman filter module (201) uses the compensated angular velocity (Z) g The compensated acceleration value (Z) a ) and the compensated magnetic field data (Z) m The Kalman filter is used to perform the Kalman filtering process to filter out noise signals.

9. The valve sensor according to claim 1, wherein, The data processing unit (200) further includes a state calculation module (204) for calculating the state of the valve (1), and the state calculation module (204) is configured to: The acceleration value processed by the data fusion module (202) is integrated over time to calculate the displacement of the valve (1); and The angular velocity processed by the data fusion module (202) is integrated over time to calculate the state angle (θ, γ, ψ) of the valve (1).

10. The valve sensor according to claim 9, wherein, The state calculation module (204) is configured to calculate the state angles (θ, γ, ψ) of the valve (1) by executing the following algorithm: The relationship between the state angular velocities of the three-axis gyroscope (102) along the x, y, and z axes and their angular velocities in the geographic coordinate system is defined by the following equations: Where, ω x ω y ω z C1 represents the state angular velocity of the three-axis gyroscope along the x, y, and z axes; C2 and C3 represent the constant drift of the three-axis gyroscope. θ and ψ are Euler angular velocities; The Euler angular velocity is calculated using the following equation: θ, ψ): The state, speed, and position information of the valve are calculated using quaternions using the following equation: in, and These represent the angular velocity components of the carrier coordinate system relative to the reference coordinate system along the x-axis, y-axis, and z-axis, respectively; Q(q0, q1, q2, q3) = q0 + q1i + q2j + q3k, where q0, q1, q2, and q3 are the four elements of a quaternion, all of which are real numbers, and i, j, and k are mutually orthogonal unit vectors; The state angles (θ, γ, ψ) of the valve are calculated using the following equations: θ=arcsin(2(q2q3+q0q2)) The valve's state angles (θ, γ, ψ) include the pitch angle (θ) around the Y-axis, the roll angle (γ) around the X-axis, and the yaw angle (ψ) around the Z-axis.

11. The valve sensor according to claim 10, wherein, The data processing unit (200) further includes a trajectory fitting module (205) for fitting the 3D trajectory of the valve, and the trajectory fitting module is configured to fit the 3D trajectory of the valve using the following circular arc fitting formula: Where x represents the valve's x-axis coordinate; y represents the valve's y-axis coordinate; z represents the valve's z-axis coordinate; r represents the radius of the arc; α represents the starting angle of the fitted motion; θ represents the central angle; h1 represents the valve's ending height; and h2 represents the valve's starting height. Indicates the end angle of the valve; Indicates the initial angle of the valve; Indicates the current angle of the valve.

12. The valve sensor according to claim 11, wherein, The data processing unit (200) further includes a data storage module (206) and a microprogram controller (207). The data storage module is configured to store the arc radius of the valve, the initial angle of the valve, the initial 3D motion trajectory of the valve, and the magnetic field data of the valve after initial installation, measured by the triaxial magnetometer. The microprogram controller (207) is configured to obtain the initial 3D motion trajectory of the valve from the data storage module (206) and set it as a reference value, and compare the reference value with the current 3D motion trajectory fitted by the trajectory fitting module (205).

13. The valve sensor according to claim 12, wherein, The microprogram controller (207) is configured to determine that the valve (1) is worn when the deviation between the reference value and the current 3D motion trajectory is greater than or equal to a deviation threshold.

14. The valve sensor according to claim 12, wherein, The valve sensor further includes an acoustic sensor (302) for providing real-time ambient sound data, and the acoustic sensor (302) is configured to detect a leakage acoustic signal when the valve leaks, and to perform noise reduction processing on the detected leakage acoustic signal. The data storage module (206) also stores historical data of the valve when it is not leaking. The microprogram controller (207) is configured to compare the noise-reduced leakage acoustic signal received from the acoustic sensor (302) with historical data stored in the data storage module (203) during non-leakage periods to determine whether a leakage has occurred.

15. The valve sensor according to claim 12, wherein, The valve sensor also includes a low-power vibration sensor (303) for providing real-time vibration data. The data storage module (206) also stores the vibration threshold when the valve enters the working state. The microprogram controller (202) is configured to compare current vibration data received from the low-power vibration sensor (303) with the vibration threshold stored in the data storage module (203) to determine whether the valve is in a stationary or rotating state.

16. The valve sensor according to claim 15, wherein, The microprogram controller (202) is also configured to: When it is determined that the valve is in the stationary state, the valve sensor is prompted to enter a sleep state to reduce power consumption; and When it is determined that the valve is in the rotating state, the valve sensor is prompted to enter the working state to realize the sleep wake-up function.

17. The valve sensor according to any one of claims 1 to 16, wherein, The valve sensor also includes: Wireless module (304) for data transmission between the valve sensor and the terminal system; and A transmitting antenna (305) is connected to the wireless module (304) for transmitting and receiving the status data of the valve.

18. A valve system, characterized in that, The valve system includes a valve and a valve sensor according to any one of claims 1 to 17 mounted on the valve.

19. A method for detecting the state of a valve using a valve sensor, comprising: Install the valve sensor according to any one of claims 1 to 17 on the valve; The acceleration value of the valve during movement is measured by a triaxial accelerometer (101); The real-time angular velocity of the valve is measured using a three-axis gyroscope (102); The magnetic field data of the valve were measured using a triaxial magnetometer (103); Kalman filtering is performed on the acceleration values ​​measured by the triaxial accelerometer (101), the angular velocity measured by the triaxial gyroscope (102), and the magnetic field data measured by the triaxial magnetometer (103) by the Kalman filter module (201) to filter out noise signals. as well as The data fusion module (202) fuses the data processed by the Kalman filtering process so that the corresponding acceleration values, angular velocities and magnetic field data compensate each other to reduce the error of the measurement results.

20. The method of claim 19, further comprising: The ambient temperature data (T) is measured in real time using a temperature sensor (301); as well as The temperature compensation module (203) uses the ambient temperature data (T) measured by the temperature sensor (301) to perform temperature compensation on the acceleration value measured by the triaxial accelerometer (101), the angular velocity measured by the triaxial gyroscope (102), and the magnetic field data measured by the triaxial magnetometer (103) to calculate the compensated angular velocity, the compensated acceleration value, and the compensated magnetic field data.