Valve viscosity data detection processing method based on artificial intelligence

文档序号:95004 发布日期:2021-10-12 浏览:27次 中文

阅读说明:本技术 基于人工智能的阀门粘滞数据检测处理方法 (Valve viscosity data detection processing method based on artificial intelligence ) 是由 何佳楠 于 2021-09-07 设计创作,主要内容包括:本发明公开了一种基于人工智能的阀门粘滞数据检测处理方法,方法包括以下步骤,步骤一:获取阀门控制回路运行时的OP与PV数据;步骤二:对于OP与PV数据进行处理;步骤三:基于神经网络实现对阀门粘滞的检测。本发明与现有技术相比,其有益效果为:本发明通过构建控制时延累计和平稳波动值,来反映序列控制时延的波动,可以有效反映出阀门粘滞导致时延发生变化的情况,进而可以更好的让网络判断是否存在阀门粘滞。本发明通过DTW、波峰波谷算法构建出阀门进出数据距离序列,可以有效判断出阀门输入输出信号的变化关系。(The invention discloses a valve viscosity data detection processing method based on artificial intelligence, which comprises the following steps: acquiring OP and PV data of a valve control loop during operation; step two: processing OP and PV data; step three: and realizing the detection of the valve viscosity based on the neural network. Compared with the prior art, the invention has the beneficial effects that: the invention reflects the fluctuation of sequence control delay by constructing the control delay accumulation and the stable fluctuation value, can effectively reflect the condition that the delay is changed due to valve viscosity, and further can better enable the network to judge whether the valve viscosity exists. According to the invention, a valve in-out data distance sequence is constructed through DTW and wave crest and trough algorithms, so that the change relation of the input and output signals of the valve can be effectively judged.)

1. A valve viscosity data detection processing method based on artificial intelligence comprises the following steps: acquiring OP and PV data of a valve control loop during operation; step two: processing OP and PV data; step three: realizing the detection of valve viscosity based on a neural network; the third step specifically comprises: the neural network comprises two time convolution networks and a full-connection network, wherein the input data of the first time convolution network is a control delay accumulation and stable fluctuation value sequence T1, the shape is [ B, None,1], wherein B is the batch quantity of samples input by the network represented by the Batchsize, None represents the quantity of wave peak and wave trough values, and because the quantity of wave peaks and wave troughs of each acquisition cycle is different, None represents the accumulation and stable fluctuation values, and finally feature extraction is carried out through the first time convolution network to output a first feature vector; the input data of the second time convolution network is DTW distance sequence, the shape is [ B, None,1], wherein B is Batchsize and represents the number of sample batches input by the network, None represents the number of loop control cycles, because the number of loop control cycles is different in each acquisition cycle, None represents the DTW distance of op and mv data, finally the feature extraction is carried out by the second time convolution network, a second feature vector is output, then the feature fusion is carried out on the first feature vector and the second feature vector, the fusion method adopts a concatemate method and fuses one feature vector which is called a third feature vector, the input of the full-connection network is the third feature vector, finally a Softmax classification function is adopted to output the probability of whether the valve viscosity exists in the acquisition cycle, then the maximum probability is taken to obtain the valve condition, and if the probability of the valve viscosity existing after one time is reasoned to be 0.9, if the condition that the data does not exist is 0.1, valve viscosity exists in the sampling period, the loss function adopts cross entropy, the label of the network is data collected historically, and the valve viscosity detection can be carried out through the method through artificial marking.

2. The method for detecting and processing the valve viscosity data based on the artificial intelligence as claimed in claim 1, wherein the first step is specifically as follows: the method comprises the steps of collecting OP and PV data of a valve in real time, wherein the time interval of data sampling is 1s, judging whether the valve sticking condition exists every fifteen minutes, collecting 900 data in total in 15 minutes, and collecting OP and PV data under the valve sticking and normal valve conditions, wherein the OP represents an input data curve of the valve, and the PV represents an output data curve of the valve.

3. The method for detecting and processing the valve viscosity data based on the artificial intelligence as claimed in claim 1 or 2, wherein the second step specifically comprises: acquiring all control periods in a detection period by adopting a peak-valley detection algorithm to obtain a peak point and valley point coordinate set of OP and PV data; acquiring control time delay to obtain a control time delay sequence; carrying out trend-removing fluctuation analysis on the control time delay sequence; and obtaining a DTW distance through OP and MV data between every two troughs, and finally obtaining a DTW distance sequence.

4. The method for detecting and processing the valve viscosity data based on the artificial intelligence as claimed in claim 1 or 2, wherein the analysis of the detrending fluctuation of the control delay sequence is specifically as follows: for the control time delay sequence x (t), calculating the cumulative sum sequence y (t)

Average control delay value of the sequence; k represents the length of the sequence;

the average value of the time series is filtered out firstly; then, performing first-order linear fitting on the accumulated sum sequence by using a least square method to obtain an equation:

k is the slope and b is the intercept;

calculating a smooth fluctuation value T1 of the cumulative sum sequence:

the mapping coefficient is expressed, for the control time delay sequence, a straight line parallel to an x axis is required, the optimal condition is expressed, no time delay change exists, k =0 when the straight line is parallel to the x axis, when the straight line is not parallel to the x axis, the slope is increased, the fluctuation is increased when the slope is increased, and the fluctuation value is 0 when 1 in fluctuation avoids k = 0;an empirical value of 10;

obtaining a smooth fluctuation value by the above, wherein the larger the value is, the larger the fluctuation of the sequence is;

finally, the accumulated and smooth fluctuation value sequence T1 is obtained.

5. The method for detecting and processing the valve viscosity data based on the artificial intelligence as claimed in claim 1 or 2, wherein a DTW distance is obtained through OP and MV data between every two troughs, and the final DTW distance sequence is specifically obtained by: because the value ranges of OP and PV variables in a loop are different greatly, 2 variables are normalized by adopting range normalization, then OP and MV data between every two adjacent wave troughs are subjected to sequence similarity measurement by utilizing dynamic time normalization (DTW), the OP and MV data between every two adjacent wave troughs are measured, the DTW finally obtains the distance between two time sequence data, the distance is larger, the similarity is smaller, the detection is carried out once every 15 minutes, the data collected in 15 minutes usually comprises a plurality of wave crests and wave troughs, the OP and MV data between every two wave troughs obtain a DTW distance, and finally a DTW distance sequence is obtained.

Technical Field

The invention relates to the field of big data processing, in particular to a valve viscosity data detection processing method based on artificial intelligence.

Background

A normal valve is linear when operating, and the actual opening degree of the valve can well follow the control signal, but due to the problems of internal component wear and the like, the valve may have nonlinear characteristics after operating for a period of time, such as hysteresis, dead zone, viscosity and the like, wherein the viscosity is the most frequently occurring problem. Valve sticking often leads to the return circuit to appear oscillating, reduces the control performance of return circuit, and relies on the manual work to carry out the viscous detection to every valve in the mill and can waste a large amount of manpower and materials. Therefore, how to utilize the data in the control loop to perform the automatic valve sticking detection becomes an important issue in the field of monitoring and diagnosing the performance of the control loop.

Disclosure of Invention

The invention aims to solve the defects in the prior art, and provides a valve viscosity data detection processing method based on artificial intelligence.

In order to achieve the purpose, the invention adopts the following technical scheme:

a valve viscosity data detection processing method based on artificial intelligence comprises the following steps: acquiring OP and PV data of a valve control loop during operation; step two: processing OP and PV data; step three: and realizing the detection of the valve viscosity based on the neural network.

Further, the first step specifically comprises: the method comprises the steps of collecting OP and PV data of a valve in real time, wherein the time interval of data sampling is 1s, judging whether the valve sticking condition exists every fifteen minutes, collecting 900 data in total in 15 minutes, and collecting OP and PV data under the valve sticking and normal valve conditions, wherein the OP represents an input data curve of the valve, and the PV represents an output data curve of the valve.

Further, the second step specifically includes: acquiring all control periods in a detection period by adopting a peak-valley detection algorithm to obtain a peak point and valley point coordinate set of OP and PV data; acquiring control time delay to obtain a control time delay sequence; carrying out trend-removing fluctuation analysis on the control time delay sequence; and obtaining a DTW distance through OP and MV data between every two troughs, and finally obtaining a DTW distance sequence.

Further, the third step specifically includes: the neural network comprises two time convolution networks and a full-connection network, wherein the input data of the first time convolution network is a control delay accumulation and stable fluctuation value sequence T1, the shape is [ B, None,1], wherein B is the batch quantity of samples input by the network represented by the Batchsize, None represents the quantity of wave peak and wave trough values, and because the quantity of wave peaks and wave troughs of each acquisition cycle is different, None represents the accumulation and stable fluctuation values, and finally feature extraction is carried out through the first time convolution network to output a first feature vector; the second time convolution network input data is a DTW distance sequence. The shape of the system is [ B, None,1], wherein B is Batchsize and represents the number of sample batches input by the network, None represents the number of loop control cycles, each acquisition cycle has different number of loop control cycles, None represents 1 and represents the DTW distance of op and mv data, finally feature extraction is carried out through a second time convolution network, a second feature vector is output, then feature fusion is carried out on the first feature vector and the second feature vector, a Concatenate method is adopted in the fusion method and is fused into a feature vector which is called a third feature vector, the input of a full-connection network is the third feature vector, finally a Softmax classification function is adopted, the probability of whether valve sticking exists in the acquisition cycle is output, and then the maximum probability is taken to obtain the valve condition. If the probability of the valve viscosity existing after one inference is 0.9 and the non-existing condition is 0.1, the valve viscosity exists in the sampling period, the loss function adopts cross entropy, the label of the network is data collected in history, and the valve viscosity detection can be carried out through the method after artificial marking.

Further, the trend-removing fluctuation analysis of the control delay sequence specifically comprises: for the control time delay sequence x (t), calculating the cumulative sum sequence y (t)

Average control delay value of the sequence; k represents the length of the sequence;

the average value of the time series is filtered out firstly; then, performing first-order linear fitting on the accumulated sum sequence by using a least square method to obtain an equation:

k is the slope and b is the intercept.

Calculating a smooth fluctuation value T1 of the cumulative sum sequence:

the mapping coefficient is expressed, for the control time delay sequence, a straight line parallel to an x axis is required, the optimal condition is expressed, no time delay change exists, k =0 when the straight line is parallel to the x axis, when the straight line is not parallel to the x axis, the slope is increased, the fluctuation is increased when the slope is increased, and the fluctuation value is 0 when 1 in fluctuation avoids k = 0;an empirical value of 10;

obtaining a smooth fluctuation value by the above, wherein the larger the value is, the larger the fluctuation of the sequence is;

finally, the accumulated and smooth fluctuation value sequence T1 is obtained.

Further, obtaining a DTW distance through OP and MV data between every two troughs, and finally obtaining a DTW distance sequence specifically includes: because the value ranges of OP and PV variables in a loop are greatly different, 2 variables are normalized by adopting range normalization, then OP and MV data between every two adjacent wave troughs are subjected to sequence similarity measurement by utilizing dynamic time normalization (DTW), the OP and MV data between every two adjacent wave troughs are measured, the DTW finally obtains the distance between two time sequence data, the distance is larger, the similarity is smaller, the detection is carried out once every 15 minutes, the data acquired in 15 minutes usually comprises a plurality of wave crests and wave troughs, the OP and MV data between every two wave troughs obtain a DTW distance, and finally a DTW distance sequence is obtained

Compared with the prior art, the invention has the beneficial effects that: the invention reflects the fluctuation of sequence control delay by constructing the control delay accumulation and the stable fluctuation value, can effectively reflect the condition that the delay is changed due to valve viscosity, and further can better enable the network to judge whether the valve viscosity exists. According to the invention, a valve in-out data distance sequence is constructed through DTW and wave crest and trough algorithms, so that the change relation of the input and output signals of the valve can be effectively judged.

Drawings

FIG. 1 is a graph of OP and PV data;

fig. 2 is a graph of typical input-output characteristics of a viscous valve.

Detailed Description

The technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention.

The method comprises the following steps: and acquiring OP and PV data when the valve control loop operates.

For valve control, valves exist in many industrial scenes, and the invention takes a steam pump sealing water valve control loop as an example. The sealing water of the air pump has the functions of preventing high-pressure and high-pressure water from leaking from the interior of the air pump and preventing air from leaking from the low-pressure side.

The control loop adopts a PID controller, the process variable is the outlet temperature of the sealing water, OP and PV data of a valve of the control loop are collected in real time, the time interval of data sampling is 1s, whether the valve sticking condition exists or not is judged every fifteen minutes, and the total number of the collected data in 15 minutes is 900. Meanwhile, OP and PV data under the conditions of valve viscosity and normal valve condition are also acquired.

As shown in fig. 1, OP represents the input data curve of the valve, and PV represents the output data curve of the valve.

Step two: OP and PV data are processed.

For a period of time, there are multiple cycles of valve control process, so a peak and trough detection algorithm is used to obtain all control cycles within the detection cycle (15 minutes).

The specific method of the peak and trough detection algorithm is as follows:

a) the data sequence may be represented as V = [ V1, V2, …, vn ]. n are the locations of the data, each location having a data value.

b) Calculate the first order difference vector DiffV of V:

diffv (i) = V (i +1) -V (i), wherein i ∈ 1,2, …, N-1

c) Performing sign function operation on the difference vector, wherein Trend = sign (Diffv), namely traversing Diffv, and if Diffv (i) is greater than 0, taking 1; if equal to 0, 0 is selected; if the value is less than 0, taking-1.

d) Traversing the Trend vector from the tail, the following operations are carried out:

if Trend (i) =0 and Trend (i +1) ≧ 0, Trend (i) =1

if Trend (i) =0 and Trend (i +1) <0, then Trend (i) = -1

e performs a first order difference operation on the Trend vector to obtain R = diff (Trend).

f) And traversing the obtained difference vector R:

i. if r (i) = -2, i +1 is one peak bit of the projection vector V, and the corresponding peak is V (i + 1);

if r (i) =2, then i +1 is one trough position of the projection vector V, and the corresponding trough is V (i + 1).

Therefore, the coordinate set of the peak point and the valley point of the OP and PV data can be found.

Since there is a wide time delay in the control loop, a change in OP will affect the PV over time. Therefore, the time delay should be the same for each cycle, when there is viscosity, the valve viscosity, that is, the output of the valve sometimes cannot follow the input to change, there is a barrier in the valve movement, such as the valve "sticks" and the output flow changes with viscosity, which causes the time delay to change.

Acquiring control time delay, namely the time difference between each OP data peak-valley point and each PV data corresponding peak-valley:

represents OP and PV data time delay of the ith peak or trough,time indices representing the ith peak or valley point in the OP data and PV data, respectively.

Finally, a control time delay sequence is obtained, the length of the sequence is related to the number of the detected wave crests and wave troughs, and the length of the sequence is equal to the sum of the number of the wave crests and the wave troughs.

And further, carrying out trend-removing fluctuation analysis on the control time delay sequence.

One advantage of the detrending fluctuation analysis method is that it can effectively filter trend components of each order in the sequence, by the steps of:

for the control time delay sequence x (t), calculating the cumulative sum sequence y (t)

The delay value is controlled for the average of the sequence. k represents the length of the sequence.

The time series average is filtered first. Because of the possible presence of cyclic or fluctuating components for a general time series, a time series may have random components, and filtering out these components of the series may be of great help.

Then, performing first-order linear fitting on the accumulated sum sequence by using a least square method to obtain an equation:

k is the slope and b is the intercept.

Calculating a smooth fluctuation value T1 of the cumulative sum sequence:

the mapping coefficient is expressed, for the control time delay sequence, a straight line parallel to an x-axis is adopted, the optimal condition is expressed, no time delay change exists, k =0 is expressed when the straight line is parallel to the x-axis, the slope exists when the straight line is not parallel to the x-axis, the greater the slope is expressed as the greater the fluctuation, and the fluctuation value is 0 when 1 in the fluctuation avoids k = 0.The empirical value is 10.

By finding the smooth fluctuation value as described above, a larger value represents a larger fluctuation of the sequence.

Finally, the accumulated and smooth fluctuation value sequence T1 is obtained.

Typical input-output characteristics of a viscous valve are shown in fig. 2.

The straight line l represents the motion of the valve when no viscosity exists, and the input and the output of the valve have good linear characteristic relation. When the valve is stuck, the valve output moves along the path a → B → C → D → E → F → G → H → a with the change of the valve input signal, and the input and output thereof exhibit nonlinear characteristics.

Therefore, the invention adopts DTW to judge the relation of the input and output data of the corresponding control period when the valve returns to the slow control so as to judge the change relation of the input and output signals of the valve.

Because the values of the OP and PV variables in the loop are very different, 2 variables are normalized by range normalization.

Then, the OP and MV data between every two adjacent troughs are subjected to sequence similarity measurement by utilizing Dynamic Time Warping (DTW). Compared to euclidean distance equivalent metrics, DTW is an elastic similarity metric that allows one-to-many alignment of points between two time series and avoids the problem of unequal data lengths between two data periods.

The DTW is adopted to judge the distance of the valve during loop control, so that the problem of indefinite length can be avoided.

And measuring OP and MV data between every two adjacent wave troughs. The DTW can be used for analyzing the similarity of two time sequence data in shape without considering the problems of data scale, sampling frequency, time sequence length and the like. The DTW finally obtains the distance between two time sequence data, and the larger the distance is, the smaller the similarity is.

Since the detection is performed every 15 minutes, the data collected in 15 minutes usually contains a plurality of peaks and valleys, and thus the OP and MV data between every two valleys obtain a DTW distance.

And finally obtaining the DTW distance sequence.

Step three: and realizing the detection of the valve viscosity based on the neural network.

The convolution network with a large receptive field can better capture the relative relation between characteristics of OP and PV, the time convolution network has expansion convolution, and compared with the ordinary convolution, the expansion convolution has a parameter of expansion rate (expansion rate) besides the size of a convolution kernel, and is mainly used for expressing the expansion size. The difference between the two is that the dilated convolution has a larger receptive field. With the dilation convolution, a larger receptive field can be obtained under the same parameters.

Here, a neural network is used for valve sticking detection.

The detailed steps of training are as follows: the neural network comprises two time convolution networks, one fully connected network. By adopting the time convolution network, the problem of different loop control cycle numbers in each acquisition cycle can be solved.

The first time convolution network input data is a control delay accumulation and stable fluctuation value sequence T1, the shape is [ B, None,1], wherein B is a batch size representing the number of the network input sample batches, and None represents the number of wave peak and wave trough values.

The second time convolution network input data is a DTW distance sequence. The shape is [ B, None,1], wherein B is batch size and represents the number of sample batches input by the network, None represents the number of loop control cycles, and because the number of loop control cycles is different in each acquisition cycle, 1 represents the DTW distance of op and mv data, and finally the feature extraction is carried out through a second time convolution network, and the output is a second feature vector.

And then, performing feature fusion on the first feature vector and the second feature vector, wherein the fusion method adopts a Concatenate method to fuse the first feature vector and the second feature vector into a feature vector, which is called as a third feature vector.

And the input of the full-connection network is a third characteristic vector, a Softmax classification function is finally adopted, the probability of whether the valve is sticky or not in the acquisition period is output, and then the maximum probability is taken to obtain the valve condition. If the probability of the valve viscosity existing after one inference is 0.9, and the nonexistence condition is 0.1, the valve viscosity exists in the sampling period.

The loss function uses cross entropy.

The label of the network is data collected historically and is marked artificially.

At this point, valve sticking detection can be performed by the method.

The above description is only for the preferred embodiment of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art should be considered to be within the technical scope of the present invention, and the technical solutions and the inventive concepts thereof according to the present invention should be equivalent or changed within the scope of the present invention.

10页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:用于识别轴承的类型的装置

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!