Dynamic characteristic modeling method and system for double-container water tank liquid level system and storage medium

文档序号:134660 发布日期:2021-10-22 浏览:32次 中文

阅读说明:本技术 双容水箱液位系统动态特性建模方法、系统及存储介质 (Dynamic characteristic modeling method and system for double-container water tank liquid level system and storage medium ) 是由 彭辉 方知涵 于 2021-08-13 设计创作,主要内容包括:本发明公开了一种双容水箱液位系统动态特性建模方法、系统及存储介质,模型在被实际应用之前所有相关参数通过合适的参数辨识方法被辨识出来,减小了在线参数辨识对控制系统硬件计算速度的要求。在系统的任何工作点,模型均可被转化为线性ARX模型,方便用于双容水箱液位预测控制算法的设计。该模型具有全局非线性描述能力,针对双容水箱液位控制系统的不同工作点,可以转化为具有不同参数的ARX模型,是更贴合双容水箱液位控制系统实际工作特点的非线性模型。(The invention discloses a dynamic characteristic modeling method, a dynamic characteristic modeling system and a storage medium for a double-container water tank liquid level system. At any working point of the system, the model can be converted into a linear ARX model, and the method is convenient for designing a liquid level prediction control algorithm of the double-container water tank. The model has global nonlinear description capability, can be converted into ARX models with different parameters aiming at different working points of the double-capacity water tank liquid level control system, and is a nonlinear model which is more fit with the actual working characteristics of the double-capacity water tank liquid level control system.)

1. A dynamic characteristic modeling method for a double-container water tank liquid level system is characterized in that a model expression of the double-container water tank liquid level system is as follows:

wherein t is sampling time, and r and s represent variable lag steps; u. of1(t)、u2(t) is the system input at the sampling time t, i.e. the opening degrees of the first water tank water inlet electric valve and the second water tank water inlet electric valve, and U (t) is the input set at the sampling time t; y is1(t)、y2(t) is the system output at the sampling time t, i.e. the liquid level heights of the first water tank and the second water tank, and Y (t) is the output set at the sampling time t; phi (t-1) represents the model bias at the sampling instant of t-1, phi1(x1(t-1))、φ2(x2(t-1)) respectively for the first tank andoffset, x, of the second tank output variable modelλ(t-1)=[yλ(t-Tx),yλ(t-Tx+1),…,yλ(t-1)]Tλ 1,2 denotes a state vector, TxIs the dimension of the state vector; a. thek(t-1)、Bs(t-1) represents a coefficient matrix, are respectively the elements in the coefficient matrix; e (t) is a modeling error; n isp、nqOrder, n, of the output vector and input vector respectivelydIs an input variable skew factor.

2. The method of claim 1, wherein the first tank corresponds to a parameter φ1(x1(t-1))、 Parameter phi corresponding to the second tank2(x2(t-1))、 Are calculated by an LSTM-Attention model; wherein, the parameter phi corresponding to the first water tank1(x1(t-1))、 Calculated by the following LSTM-Attention model:

y denotes the level y of the first tank1Representing matrix dot multiplication, namely multiplying two matrixes with the same size item by item;respectively representing the cell state and output, namely the initialization state, of the 1 st time step in the kth layer of the LSTM; for the layer 1 LSTM to be used,indicating the cellular state and output at the l-th time step in layer 1 LSTM,respectively the weights of the forgetting gate, the input gate conversion and the output gate of the LSTM of the 1 st layer,for model biasing corresponding to layer 1 LSTM, the input of layer 1 LSTM is the element of state vector x (T-1) split to each time step, i.e. the input of layer 1 LSTM is y (T-T)x),y(t-Tx+1),.., y (t-2), y (t-1); for non-layer 1 LSTM, σ denotes a hard signature activation function,indicating the cellular state and output at the l-th time step in the k-th layer LSTM,respectively the weights of the forgetting gate, the input gate conversion and the output gate of the kth layer LSTM,for corresponding model bias, the inputs of the non-layer 1 LSTM are the cell state and output of the previous layer corresponding to the time stepm is the number of LSTM layers, hmA feature matrix representing the composition of all time steps of the last layer,is hmAn element of (1); watt、battCalculating an attention coefficient att corresponding to each item of the feature matrix through a softmax activation function for the weight and the bias of the attention network; flatten represents the operation of matrix tiling into vectors; wfc、bfcFor the weights and offsets of the fully connected layers,denotes the tan h activation function, δ, of the fully connected layer1,t-1Y output for LSTM-Attention model1The state of (t) depends on the coefficient vector.

3. The method of modeling the dynamic characteristics of a dual-tank liquid level system as recited in claim 1 or 2, wherein the optimization process of the dual-tank liquid level system model comprises:

construct the following loss function EλContinuously updating parameters of a model of the double-container water tank liquid level system through a back propagation algorithm, wherein the loss function E isλThe minimum corresponding double-container water tank liquid level system model is the optimized double-container water tank liquid level system model;

wherein N is the number of training data samples of the model of the double-container water tank liquid level system, NyPredicting time domain, y, for a dual-tank liquid level system modelλ(alpha + beta) represents the actual output value of the double-container water tank liquid level system at the moment of alpha + beta,model predicted output value representing a forward β step at time α, β ═ 1,2, …, Ny

4. The method of modeling the dynamic characteristics of a dual tank water level system according to claim 3,the calculation formula of (2) is as follows:

wherein, gamma isλThe expression (α) is:

if beta is less than or equal to i + r

xλ(α) is the input of the LSTM-Attention model at the α time, Γλ(α) from the time α

The output quantity composition of LSTM-Attention; psi (alpha + beta-1 | alpha) is a regression variable set of the model of the double-container water tank liquid level system;model prediction output of a forward beta-i step based on a double-container water tank liquid level system model at alpha moment; y isλ(α-Tx+1) is alpha-TxActual output value of the double-container water tank liquid level system at +1 moment.

5. A method for identifying parameters of a model of a double-container water tank liquid level system is characterized by comprising the following steps:

1) acquiring input data and output data of a double-container water tank liquid level system, constructing a data set, and dividing the data set into training sets; constructing a model of the dual tank level system of claim 1 and initializing model parameters;

2) and carrying out forward operation on the double-container water tank liquid level system model, namely: using the training set data as the input of the model of the dual-containing tank liquid level system, performing forward calculation according to the LSTM-Attention model of claim 2 to obtain the state dependent coefficients of the model of the dual-containing tank liquid level system, and calculating the predicted output of the model of the dual-containing tank liquid level system

3) Predictive output using dual tank level system modelAnd the actual output value y of the double-container water tank liquid level systemλ(α + β) of the bis of claim 3 or 4Loss function E of multi-step prediction error output by water tank liquid level system modelλAnd updating parameters of the double-container water tank liquid level system model through a back propagation algorithm until the loss function is minimum, and obtaining a final double-container water tank liquid level system model.

6. The method of claim 5, wherein the model parameters of the dual-tank level system are identified,

further comprising:

4) calculating a final loss function value of a multi-step prediction error output by the double-container water tank liquid level system model;

5) changing the order of the double-container water tank liquid level system model, repeating the steps 2) to 4), comparing the optimized loss function values under different model orders, and selecting the model order and the model parameters with the minimum loss function value as the optimized double-container water tank liquid level system model.

7. A dynamic characteristic modeling system of a double-container water tank liquid level system is characterized by comprising computer equipment; the computer device is configured or programmed for carrying out the steps of the method according to one of claims 1 to 4.

8. A computer-readable storage medium characterized by; comprising a program running in a processor; the program is configured for carrying out the steps of the method according to one of claims 1 to 4; alternatively, the program is configured to perform the steps of the method of claim 5 or 6.

9. A double-container water tank liquid level system model parameter identification system is characterized by comprising computer equipment; the computer device is configured or programmed for carrying out the steps of the method of claim 5 or 6.

Technical Field

The invention relates to the field of modeling of a double-container water tank liquid level control system, in particular to a dynamic characteristic modeling method and system of a double-container water tank liquid level system and a storage medium.

Background

The experimental device of the double-container water tank system is used as common experimental equipment, has a simple structure, has typical industrial characteristics such as coupling, nonlinearity, time lag and the like, and is one of key objects of process control research. The control of the liquid level of the water tank as one of the process controls has great practical significance in the industrial production process. In practical industrial processes such as purification of petroleum, smelting of metals, generation of chemical reagents and the like, the efficiency and safety of industrial production are directly influenced by the quality of the liquid level control effect. Therefore, the method for modeling and controlling the advanced and efficient liquid level control system has great practical significance in research, and the water tank is used as a main research object of liquid level control, so that the method has great research significance and practical value.

Model Predictive Control (MPC) is often used as a main control algorithm for water tank level control due to its excellent control effect and flexible and convenient modeling. In the control process of MPC, whether the prediction model can accurately describe all dynamic characteristics of the system determines the final control effect. A common modeling method of the double-containing water tank liquid level control system comprises mechanism modeling and system identification based on input and output data. Where it is difficult to obtain an accurate model and parameters of the model for mechanistic modeling. The system identification is used as a 'black box' method, dynamic characteristics of the system are mined by analyzing input and output data of the system, and the method is very suitable for building a prediction model of the MPC. However, the model structure used in the existing water tank system identification modeling method is not complete in the aspect of mining the nonlinear dynamic characteristics of the system, and the output of the water tank system cannot be accurately predicted.

Disclosure of Invention

The invention aims to solve the technical problem that aiming at the defects of the prior art, the invention provides a dynamic characteristic modeling method, a dynamic characteristic modeling system and a storage medium for a double-container water tank liquid level system, and the output prediction precision of a model is improved so as to improve the effect of prediction control.

In order to solve the technical problems, the technical scheme adopted by the invention is as follows: a dynamic characteristic modeling method for a double-container water tank liquid level system is disclosed, wherein a model expression of the double-container water tank liquid level system is as follows:

wherein t is sampling time, and r and s represent variable lag steps; u. of1(t)、u2(t) is the system input at the sampling time t, i.e. the first tank water inlet electric valve and the second tank water inlet electric valveThe opening degree of the valve, U (t), is an input set at the sampling time t; y is1(t)、y2(t) is the system output at the sampling time t, i.e. the liquid level heights of the first water tank and the second water tank, and Y (t) is the output set at the sampling time t; phi (t-1) represents the model bias at the sampling instant of t-1, phi1(x1(t-1))、φ2(x2(t-1)) represents the bias, x, for the first and second tank output variable models, respectivelyλ(t-1)=[yλ(t-Tx),yλ(t-Tx+1),…,yλ(t-1)]Tλ 1,2 denotes a state vector, TxIs the dimension of the state vector; a. thek(t-1)、Bs(t-1) represents a coefficient matrix, are respectively the elements in the coefficient matrix; e (t) is a modeling error; n isp、nqOrder, n, of the output vector and input vector respectivelydIs an input variable skew factor.

The model has global nonlinear description capability, can be converted into an ARX model with different parameters aiming at different working points of the double-capacity water tank liquid level control system, and is a nonlinear model more fit with the actual working characteristics of the double-capacity water tank liquid level control system, so that the model can improve the output prediction precision.

Parameter phi corresponding to the first water tank1(x1(t-1))、 Parameter phi corresponding to the second tank2(x2(t-1))、 Are calculated by an LSTM-Attention model; wherein, the parameter phi corresponding to the first water tank1(x1(t-1))、Calculated by the following LSTM-Attention model:

y denotes the level y of the first tank1Representing matrix dot multiplication, namely multiplying two matrixes with the same size item by item;respectively representing the cell state and output, namely the initialization state, of the 1 st time step in the kth layer of the LSTM; for the layer 1 LSTM to be used,indicating the cellular state and output at the l-th time step in layer 1 LSTM,respectively the weights of the forgetting gate, the input gate conversion and the output gate of the LSTM of the 1 st layer,for model biasing corresponding to layer 1 LSTM, the input of layer 1 LSTM is the element of state vector x (T-1) split to each time step, i.e. the input of layer 1 LSTM is y (T-T)x),y(t-Tx+1),.., y (t-2), y (t-1); for non-layer 1 LSTM, σ denotes a hard signature activation function,indicating the k-th layer of the LSTMThe cell status and output for l time steps,respectively the weights of the forgetting gate, the input gate conversion and the output gate of the kth layer LSTM,for corresponding model bias, the inputs of the non-layer 1 LSTM are the cell state and output of the previous layer corresponding to the time stepm is the number of LSTM layers, hmA feature matrix representing the composition of all time steps of the last layer,is hmAn element of (1); watt、battCalculating an attention coefficient att corresponding to each item of the feature matrix through a softmax activation function for the weight and the bias of the attention network; flatten represents the operation of matrix tiling into vectors; wfc、bfcFor the weights and offsets of the fully connected layers,denotes the tan h activation function, δ, of the fully connected layer1,t-1Y output for LSTM-Attention model1The state of (t) depends on the coefficient vector.

Aiming at the problem that the general LSTM model is insufficient in mining time sequence data, and input/output data of a double-capacity water tank liquid level control system are difficult to fully utilize, so that the characteristic is lost, an Attention mechanism is added into the LSTM model, so that the model outputs information at all time steps, and meanwhile, the model focuses more on characteristic information beneficial to the model, is a more sufficient model for mining data information, and can improve the prediction accuracy of double-capacity water tank output.

The optimization process of the double-container water tank liquid level system model comprises the following steps:

construct the following loss function EλContinuously updating parameters of a model of the double-container water tank liquid level system through a back propagation algorithm, wherein the loss function E isλThe minimum corresponding double-container water tank liquid level system model is the optimized double-container water tank liquid level system model;

wherein N is the number of training data samples of the model of the double-container water tank liquid level system, NyPredicting time domain, y, for a dual-tank liquid level system modelλ(alpha + beta) represents the actual output value of the double-container water tank liquid level system at the moment of alpha + beta,model predicted output value representing a forward β step at time α, β ═ 1,2, …, Ny

The loss function constructed by the method can utilize multi-section discontinuous input/output data information of the double-container water tank liquid level system and utilize data sets under different modes to model, so that the double-container water tank liquid level system model can describe the dynamic characteristics of the double-container water tank liquid level system under different modes. In addition, the loss function considers the long-term prediction error of the double-capacity water tank liquid level system model, and the long-term prediction capability of the double-capacity water tank liquid level system model can be improved by minimizing the double-capacity water tank liquid level system model obtained by the loss function.

In the present invention,the calculation formula of (2) is as follows:

wherein, gamma isλThe expression (α) is:

xλ(α) is the input of the LSTM-Attention model at the α time, Γλ(α) consists of the output of LSTM-Attention at time α; psi (alpha + beta-1 | alpha) is a regression variable set of the model of the double-container water tank liquid level system;model prediction output of a forward beta-i step based on a double-container water tank liquid level system model at alpha moment; y isλ(α-Tx+1) is alpha-TxActual output value of the double-container water tank liquid level system at +1 moment.

The invention also provides a method for identifying the model parameters of the double-container water tank liquid level system, which comprises the following steps:

1) acquiring input data and output data of a double-container water tank liquid level system, constructing a data set, and dividing the data set into training sets; constructing a model of the double-container water tank liquid level system and initializing model parameters;

2) and carrying out forward operation on the double-container water tank liquid level system model, namely: taking the training set data as the input of a double-containing water tank liquid level system model, carrying out forward calculation according to the LSTM-Attention model to obtain the state dependent coefficient of the double-containing water tank liquid level system model, and calculating the prediction output of the double-containing water tank liquid level system model

3) Predictive output using dual tank level system modelAnd the actual output value y of the double-container water tank liquid level systemλ(α+Beta), constructing a model of the double-container water tank liquid level system to output a loss function E of a multistep prediction errorλAnd updating parameters of the double-container water tank liquid level system model through a back propagation algorithm until the loss function is minimum, and obtaining a final double-container water tank liquid level system model.

The invention also provides a model parameter optimization strategy which is suitable for a prediction control algorithm and adopts the minimization of the multi-step forward prediction output error, so that the multi-step forward prediction output error of the model at a working point is smaller, and the model is more suitable for the design of a prediction controller.

In order to further improve the prediction accuracy of the model of the invention, the parameter identification method of the invention further comprises the following steps:

5) calculating a final loss function value of a multi-step prediction error output by the double-container water tank liquid level system model;

5) changing the order of the double-container water tank liquid level system model, repeating the steps 2) to 4), comparing the optimized loss function values under different model orders, and selecting the model order and the model parameters with the minimum loss function value as the optimized double-container water tank liquid level system model.

As an inventive concept, the invention also provides a dynamic characteristic modeling system of the double-container water tank liquid level system, which comprises computer equipment; the computer device is configured or programmed for performing the steps of the modeling method described above.

As an inventive concept, the present invention also provides a computer-readable storage medium including a program running in a processor; the program is configured for performing the steps of the modeling method described above; alternatively, the program is configured to perform the steps of the above-described parameter identification method.

As an inventive concept, the invention also provides a model parameter identification system of the double-container water tank liquid level system, which comprises computer equipment; the computer device is configured or programmed for performing the steps of the above-mentioned parameter identification method.

Compared with the prior art, the invention has the beneficial effects that: the invention provides a dynamic characteristic modeling method of a double-container water tank liquid level system based on a state-dependent ARX model (LSTM-Attention-ARX) with an Attention mechanism long and short memory network, which is an off-line identification modeling method. Before the model is actually applied, all relevant parameters are identified by a proper parameter identification method, so that the requirement of online parameter identification on the hardware calculation speed of the control system is reduced. At any working point of the system, the model can be converted into a linear ARX model, and the method is convenient for designing a liquid level prediction control algorithm of the double-container water tank. The model has global nonlinear description capability, can be converted into ARX models with different parameters aiming at different working points of the double-capacity water tank liquid level control system, and is a nonlinear model which is more fit with the actual working characteristics of the double-capacity water tank liquid level control system. The invention also provides a model parameter optimization strategy which is suitable for a prediction control algorithm and adopts the minimization of the multi-step forward prediction output error, so that the multi-step forward prediction output error of the model at a working point is smaller, and the model is more suitable for the design of a prediction controller.

Drawings

FIG. 1 is a schematic diagram of a modeling process of the present invention.

Detailed Description

Referring to fig. 1, the present invention is illustrated in a specific embodiment by taking a practical system for controlling the liquid level of a dual-tank water tank as an example.

The dynamic characteristic modeling process of the double-container water tank liquid level control actual system comprises the following steps:

1) the liquid level of the double-volume water tank is controlled by using a PID control algorithm, and input and output data which can comprehensively reflect the nonlinear dynamic characteristics of a double-volume water tank liquid level control system are collected to be used as identification data of a model (see references of Kang, T., Peng, H., Zhou, F., Tian, X., and Peng, X.,2021, Robust control of coupled water tank plant, Applied Intelligence,51, No.8,5726 and 5744.), the sampling period is 1 second, and 5000 groups of data are collected in total. The sequence of water level setpoints includes both sinusoidal and step signals to activate all dynamic modes of the system. Dividing all data sets according to the proportion of 8:2, using the first 4000 data points as a training set and the second 1000 data points as a verification set, and training the constructed LSTM-Attention-ARX model.

2) Constructing an LSTM-Attention-ARX model, wherein the specific model structure is as follows:

where t is the sampling time, u1(t)、u2(t) is the system input at the sampling time t, namely the opening degrees of the water inlet electric valve I and the valve II of the water tank 1 (first water tank) and the water tank 2 (second water tank), and U (t) is the input set at the sampling time t; y is1(t)、y2(t) is the system output at the sampling time t, namely the liquid level heights of the water tank 1 and the water tank 2, and Y (t) is the output set at the sampling time t; phi (x (t-1)) represents the model bias at the sampling instant of t-1, phi1(x(t-1))、φ2(x (T-1)) represents the offset for the tank 1 and tank 2 output variable models, respectively, as calculated from the LSTM-Attention model, where x (T-1) ═ y (T-T)x),y(t-Tx+1),...,y(t-2),y(t-1)]TRepresenting a state vector, TxIs the dimension of the state vector. A. thek(x(t-1))、Bs(x (t-1)) represents a state-dependent coefficient matrix of the model, calculated from the LSTM-Attention model; e (t) is a modeling error; n isp、nqOrder, n, of the output vector and input vector respectivelydIs a skew factor.

Two outputs y for a dual tank level system1(t) and y2(t) constructing two LSTM-orientation models with the same structure to calculate the respective corresponding y in the LSTM-orientation-ARX model1(t) and y2(t) state dependent coefficients of the model. Calculating y in the LSTM-Attention-ARX model1(t) the expression of the LSTM-Attention model corresponding to the state-dependent coefficients of the model is (computing y)2(t) the LSTM-Attention model structure of the state dependent coefficients of the corresponding model is the same as:

wherein y represents waterLiquid level y of tank 11,Represents matrix dot multiplication, i.e. multiplication of two matrices of the same size by one term.Indicating the cellular state and output, i.e., the initialization state, at time step 1 in the kth layer LSTM. For the layer 1 LSTM to be used,indicating the cellular state and output at the l-th time step in layer 1 LSTM,respectively the weights of the forgetting gate, the input gate conversion and the output gate of the LSTM of the 1 st layer, and similarly,for model biasing corresponding to layer 1, the input to this layer is the element that the state vector splits to each time step. For non-layer 1 LSTM, σ is the hard sigmoid activation function,indicating the cellular state and output at the l-th time step in the k-th layer LSTM,respectively the weights of the forgetting gate, the input gate conversion and the output gate of the kth layer LSTM, and in the same way,for the corresponding model bias, the input of the layer is the cell state and output of the previous layer corresponding to the time stepm is the number of LSTM layers, hmRepresenting a feature matrix formed by all time steps of the last layer; watt、battFor the weights and biases of the attention network, attention coefficients att corresponding to each item of the feature matrix are calculated through a softmax activation function. Flatten represents the operation of the matrix tiling into vectors. Wfc、bfcFor the weights and offsets of the fully connected layers,is the tan h activation function, δ, of the fully-connected layer1,t-1Y output for model LSTM-Attention terminal1(t) a state dependent coefficient vector for the model.

3) The parameters of the double-containing water tank LSTM-Attention-ARX model are optimized by adopting the following multi-step prediction optimization strategy:

(1) when the LSTM-Attention-ARX model of the double-containing water tank is optimized, forward N based on current and past information is used as a basisyThe error square sum of the prediction output of the model of the step is used as an objective function, and model parameters are obtained by minimizing the objective function, so that the N of the model after parameter optimizationyThe step forward prediction output is better. To this end, the loss function of the model is the sum of the squares of the multi-step forward prediction output error, i.e.:

where N is the number of model training data samples, NyPredicting the time domain, y, for the modelλ(α + β) represents the true output value at the time of α + β,denotes the forward time at time α (β ═ 1,2, …, Ny) The model of the step predicts the output value.

(2) To obtainFirstly, the state dependent coefficient of the LSTM-Attention-ARX model of the double-containing water tank at the alpha moment is calculated. For this purpose, a Keras built-in module repeat vector is adopted to carry out LSTM-Attention-ARX module on a double-containing water tank at alpha momentExtracting the state-dependent coefficient vector of the model to obtain a value of 1 × (1+2 n)p+2(nq-nd+1)) of two-tank LSTM-Attention-ARX model coefficient matrix gammaλ(. alpha.) to calculate

(3) Forward beta at time alpha 1,2, …, N based on two-tank LSTM-Attention-ARX modelyThe model predicted output value of the step is calculated according to the following formula:

wherein

xλ(α)=[yλ(α-Tx+1),yλ(α-Tx+2),...,yλ(α-1),yλ(α)]T

i=1,2,…,np

In the above formula xλ(alpha) is the input of LSTM-Attention end at alpha moment, gammaλ(α) is composed of the output quantity of the LSTM-Attention end at α; psi (alpha + beta-1 | alpha) is a regression variable set of the LSTM-Attention-ARX model of the double-water-containing tank;the model prediction output of the forward beta-i step based on the double-containing water tank LSTM-Attention-ARX model at the alpha moment is realized.

4) The parameters of the double-containing water tank LSTM-Attention-ARX model are optimized by the following steps:

a) training and checking the model by using 5000 collected input and output data, wherein the first 4000 data points are used as a training set, and the second 1000 data points are used as a verification set, and training the constructed LSTM-Attention-ARX model;

b) selecting the number of serial layers, the number of cell elements in each layer and the output order n in the LSTM-orientationdInput order nqHysteresis factor ndConstructing an LSTM-Attention-ARX model of the double-container water tank and initializing model parameters;

c) carrying out forward operation on the LSTM-Attention-ARX model of the double-capacity water tank, wherein the operation process is as follows: input training data set (x)λ(α), Ψ (α + β -1| α)); forward calculating according to the LSTM-orientation structure selected in the step b) to obtain the state dependent coefficient of the LSTM-orientation-ARX model, and calculating the predicted output of the LSTM-orientation-ARX model of the double-container water tank

d) Constructing an LSTM-Attention-ARX model to output a loss function E of a multi-step prediction errorλContinuously updating the parameters of the model through a back propagation algorithm until the loss function is minimum, and obtaining a final LSTM-Attention-ARX model of the double-container water tank;

e) calculating a loss function value of the optimized LSTM-Attention-ARX model of the double-container water tank;

f) changing the order of the LSTM-Attention-ARX model of the double-containing water tank in the step b), repeating the steps c) to e), comparing the optimized loss function values under different model orders, and selecting the model order and the model parameters when the loss function value is minimum as the final LSTM-Attention-ARX model of the double-containing water tank. The structure and modeling effect of the finally obtained optimal LSTM-Attention-ARX model are shown in Table 1.

TABLE 1 parameters of the optimal LSTM-Attention-ARX model

TABLE 2 comparison of modeling effects of different modeling methods

The modeling effect pairs of different models under the same data are shown in table 2. In table 2, the input order is 17 and the output order is 18 when the RBF-ARX model structure is optimal; the input order of the LSTM-ARX model with the optimal structure is 22, and the output order is 21. As can be seen from Table 2, the prediction error of the model (LSTM-Attention-ARX) of the present invention with respect to the training data/validation data is the smallest when the three model structures are all optimal. The results in tables 1-2 show that the modeling effect of the invention is better than that of other typical modeling methods (the smaller the prediction error is, the better the modeling effect is, and the more accurate the prediction result is).

15页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种基于物联网的液位监控系统及方法

网友询问留言

已有0条留言

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

精彩留言,会给你点赞!