A method for controlling the opening of a cage-type electric throttle valve

By combining Kalman filter and improved RBF neural network compensator with model predictive control, the problem of inaccurate valve opening control and poor stability of the caged electric throttle valve is solved, achieving higher control accuracy and system robustness. .

CN116184830BActive Publication Date: 2024-10-22SOUTHWEST PETROLEUM UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310168434.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-02-27
Publication Date
2024-10-22
Estimated Expiration
2043-02-27

AI Technical Summary

Technical Problem

The existing technology has the problems of inaccurate control and poor stability in the valve opening control of the cage-type electric throttle valve, especially the instability of the system caused by the difficulty in controlling the opening control amount and the inaccurate model.

Method used

The Kalman filter algorithm is used for state estimation, combined with the improved RBF neural network compensator and model predictive controller, nonlinear compensation is performed through the state estimation results and the output of the position detection transmitter, and the model predictive control algorithm is applied to realize the valve opening. degree of closed-loop control.

Benefits of technology

It improves the control accuracy and stability of the valve opening, reduces the impact caused by poor control of the opening control amount and inaccurate models, and enhances the robustness and dynamic performance of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116184830B_ABST
    Figure CN116184830B_ABST
Patent Text Reader

Abstract

The present invention provides a cage-type electric throttle valve opening control method, which completes state estimation through a Kalman filter, and the results after state estimation are used as one of the inputs of a model predictive controller, the input of an improved RBF neural network compensator, and the input of a reference trajectory after comparison with a set value, and the result after comparison is superimposed with the output of the compensator as another input of the model predictive controller, and the output control quantity controls the motor after optimization processing by the model predictive controller, thereby achieving the purpose of controlling the valve opening. The present invention solves the influence of model inaccuracy and improves the control accuracy and stability of the valve opening by effectively combining the Kalman filter, the improved RBF neural network and the model predictive controller.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of valve control, and in particular to a method for controlling the valve opening of a cage-type electric throttle valve. Background Art

[0002] Valves are an important part of any pipeline system and play a key role in the oil and gas industry. Valve opening control is also the most common demand in industrial production. In the process of oil and gas field development and natural gas extraction, the wellhead device, which is mainly composed of a tubing head and an oil (gas) tree, transports the oil (gas) collected from the well through the cage-type electric throttle valve on the oil (gas) tree. However, since the opening control quantity is difficult to control and the control quantity has the characteristics of time-varying and uncertainty, it will also lead to inaccurate control and extremely difficult to design accurate mathematical modeling. If the valve opening is not controlled, when the valve opening is too small, it is very easy to get blocked and cause the actuator to creep, which leads to the deterioration of the system working stability. Therefore, it is of great practical significance to design a control method to accurately control the valve opening.

[0003] In the prior art, PID control algorithm and fuzzy control algorithm are usually used to achieve this. As a controller, PID algorithm can effectively control the valve opening, and has the characteristics of simple structure, easy implementation, strong robustness, etc. However, it has the problems of slow adjustment time, oscillation, and difficulty in parameter setting. Moreover, the PID parameters set only by relying on the experience of the staff do not have universal applicability and quasi-optimal values. As a controller, fuzzy control algorithm can improve the control accuracy and response speed of the system, but the fuzzy rule table and membership function are generally derived from the experience of experts, which are highly subjective. In addition, the desire to improve accuracy will inevitably lead to an expansion of the rule search range, a reduction in decision-making speed, and even the inability to perform real-time control. There are also problems with stability and robustness. Summary of the invention

[0004] In order to overcome the shortcomings of the above-mentioned prior art and the problems of cage-type electric throttle valves during use, the purpose of the present invention is to provide a method for controlling the valve opening of a cage-type electric throttle valve, which uses Kalman filtering to complete the state estimation of the cage-type electric throttle valve, and uses the result after state estimation as one of the inputs of the model predictive controller, and the result after state estimation and the result of the position detection transmitter are compensated by the nonlinear compensation part of the learning algorithm output of the improved RBF neural network, and at the same time, the result after state estimation is compared with the set value as the input of the reference trajectory, and is transmitted to the model predictive controller together with the compensation part, and the model predictive control algorithm is used to realize closed-loop control of the valve opening of the cage-type electric throttle valve, so as to reduce the influence caused by the poor control of the opening control amount and the inaccurate model, and improve the control accuracy and stability of the valve opening.

[0005] The present invention adopts the following technical solution:

[0006] A method for controlling the valve opening of a cage-type electric throttle valve comprises the following steps:

[0007] Step 1. State Estimation

[0008] The displacement, velocity and acceleration of the valve core obtained by the position detection transmitter are used to estimate the actual state of the valve based on the Kalman filter algorithm.

[0009] Step 2. Design an improved RBF neural network compensator

[0010] The nonlinear part improves the system accuracy by improving the learning algorithm of the RBF neural network, and outputs the compensation amount with its excellent ability to approximate nonlinearity and self-adjust.

[0011] Step 3. Design a model predictive controller for valve positioning

[0012] The compensation amount of the improved RBF neural network compensator and the output amount of the reference trajectory are used as input quantities; the control amount is output by the model predictive controller, and finally the valve opening is controlled according to the control amount output by the model predictive controller.

[0013] Furthermore, step 1 specifically includes:

[0014] Step 1.1: Given the state variable in the Kalman filter: displacement p k , speed v k , acceleration a k ; a k As the control quantity, let

[0015] Step 1.2: Given the state transfer matrix and control matrix in the Kalman filter: Since

[0016]

[0017] v k =v k-1 +a k ΔT;

[0018] but The state transfer matrix Control Matrix ΔT is the time interval.

[0019] Step 1.3: From steps 1.1 and 1.2, the state prediction equation can be obtained as follows:

[0020]

[0021] in is the prior estimate at time k, is the estimated value at time k-1. Since the prediction contains noise, it brings uncertainty, so it needs to be estimated.

[0022] Step 1.4: Given the prior error covariance matrix in the Kalman filter:

[0023] The state equation including noise is: k =Fx k-1 +Ba k +ω k-1 ;

[0024] ω k-1 is the process noise, and the process noise ω is set k-1 If it conforms to the normal distribution, its expectation is 0, and its covariance matrix is ​​Q. Substitute the state equation and state prediction equation into

[0025]

[0026] The prior error covariance matrix can be obtained as:

[0027]

[0028] in

[0029] Step 1.5: Given the measurement equation in the Kalman filter including the measurement noise:

[0030] Similar to the state prediction equation, there is also uncertainty caused by noise in the measurement equation. The measurement equation including measurement noise is:

[0031]

[0032] Among them, Z k is represented by the measurement value, H is the measurement matrix, To measure noise, its expectation is 0.

[0033] Step 1.6: Posterior estimation equation:

[0034] Since both process noise and measurement noise are uncertain, the state prediction equation and measurement equation that can be used for modeling are:

[0035]

[0036] Z k =Hx k ;

[0037] According to the idea of ​​data fusion, the posterior estimation equation is:

[0038]

[0039] at this time is the optimal estimate, where K k is the Kalman gain.

[0040] Step 1.7: Kalman gain and update error covariance matrix equation

[0041] The Kalman gain can be expressed as It is concluded that Substitute the posterior estimation equation and the measurement equation, and the goal of the solution is to find K k Make the estimated value tend to the actual value, that is, find K k So that tr(P k ) is the smallest, that is, the variance is the smallest. Finally, the Kalman gain can be obtained as:

[0042]

[0043] Where R is the covariance matrix corresponding to the measurement noise.

[0044] Substituting the Kalman gain back The updated error covariance matrix equation can be obtained as:

[0045]

[0046] I is the identity matrix, K k is the Kalman gain, P k is the updated error covariance matrix;

[0047] Whether the task is completed is determined based on whether the state meets the valve opening control requirements. If not, compensation is performed based on the current state through the improved RBF neural network compensator, and the motor is controlled by the output of the model predictive controller, thereby completing the control of the valve opening and continuing with step 1.2 for state estimation.

[0048] Furthermore, the specific steps of step 2 include:

[0049] The K-means algorithm, the subtractive clustering algorithm and the particle swarm optimization algorithm are integrated as the learning algorithm of the RBF neural network. First, the number of clusters is determined by the subtractive clustering algorithm and the initial cluster center is determined by the K-means algorithm. Then all the parameters of the RBF neural network are obtained by the K-means algorithm, which is expanded as the initial particle swarm. Finally, the particle swarm optimization algorithm is used to optimize and obtain the optimal solution. The compensation amount is output through the RBF neural network's own approximate nonlinearity and self-adjustment capabilities, thereby achieving the role of nonlinear compensation.

[0050] Furthermore, step 3 specifically includes:

[0051] Step 3.1: Estimate the current system state and control variables and write them into state equations:

[0052]

[0053] x(k)=[θ(k),p(k),v(k)] T ;

[0054]

[0055] Where y represents the output, is a pure fitting function, θ is the valve opening, p is the displacement, v is the speed, is the current, u(k) represents the control quantity, is the current at time k, θ(k) is the valve opening at time k, p(k) is the displacement at time k, and v(k) is the velocity at time k.

[0056] Substituting the above formula into the discrete state space expression, the state equation is:

[0057]

[0058]

[0059] Where x(k+1) is the state vector at time k+1, u(k) is the input vector at time k, x(k) is the state vector at time k as the initial condition setting value, and y(k) is the output vector. and They are the state matrix, input matrix and output coefficient matrix of the system respectively. At this time, the opening, displacement and speed are used as state variables, and the current is used as the control variable.

[0060] Step 3.2 Determine the prediction time domain and control time domain

[0061] The system model is optimized based on u(k), u(k+1), ..., u(k+N). At time k, based on the input vector u(k) and the initial condition state vector x(k), the value of x(k+1) at the next time, i.e., time k+1, can be predicted, thereby predicting the value of the output y(k+1). Similarly, at time k+1, based on u(k+1), the value of x(k+2) at the next time, i.e., time k+2, can be predicted using the state vector x(k+1). Thus, the value of the output y(k+2) can be predicted. Similarly, the values ​​of y(k+3), y(k+4), ..., y(k+N-1) can be predicted. At time k+N-1, based on u(k+N-1) and the state vector x(k+N-1), the value of x(k+N) at time k+N can be predicted, thereby predicting the value of y(k+N) at time k+N. Let

[0062]

[0063]

[0064] Where X k It is a matrix composed of the initial condition state vector at time k and the state vector predicted at time k (e.g. x(k+1 / k)). k It is a matrix composed of the input vector at time k and the input vector predicted at time k (e.g. u(k+1 / k)). N is the prediction time domain, N=3, 4, 5, 6, 7.

[0065] Estimate the current state of the system, construct a cost function for the discrete state model, and take its minimum value to achieve the optimization purpose. Cost function:

[0066]

[0067] The error E(k+i / k)=x(k+i / k)-r, r is the reference value, i=0,1,2,...,N, are all diagonal matrices, is the weighted sum of errors, is the weighted sum of the inputs, is the final error.

[0068] To obtain the general form of quadratic programming: The standard form of X k and U k X k =Mx(k)+Cu(k), open the cost function J and get Substitute X k =Mx(k)+Cu(k) we can get,

[0069]

[0070]

[0071]

[0072] is the error adjustment matrix, is the terminal error adjustment matrix, is the input adjustment matrix, where It can be regarded as a constant related to the initial state, and all coefficient matrices All can be obtained through calculation.

[0073] Step 3.3 Rolling optimization control: obtain u(k), u(k+1), u(k+2), ..., u(k+N-1) through calculation, take only the first data u(k) into the system, and move the prediction time domain and control time domain backward by one unit to continue the prediction, and so on until the system outputs a stable reference value, thus realizing rolling optimization control.

[0074] In step 3.4, the compensation amount in step 2 and the state estimation value of the Kalman filter are compared with the set value and the value after passing through the reference trajectory is superimposed as the input of the model predictive controller. After optimization processing by the model predictive controller, the output control amount controls the motor to achieve control of the valve opening.

[0075] Beneficial effects of the present invention:

[0076] 1. The present invention adopts an improved RBF neural network to improve its operation speed and accuracy, and uses the RBF neural network's good approximation of nonlinearity and self-adjustment capabilities as a nonlinear compensator to reduce the impact of model inaccuracy.

[0077] 2. The present invention adopts a Kalman filter, which can effectively improve the uncertainty of valve state estimation due to interference and improve the accuracy of state estimation output.

[0078] 3. Combining the model predictive control algorithm with the improved RBF neural network compensator can improve the robustness of the system and make the system have better dynamic performance. BRIEF DESCRIPTION OF THE DRAWINGS

[0079] Figure 1 This is a structural block diagram of the valve opening control proposed by the present invention;

[0080] Figure 2 It is a flow chart of the valve opening control method of the present invention;

[0081] Figure 3 It is the structure diagram of RBF neural network;

[0082] Figure 4 It is a simulation effect diagram of the present invention;

[0083] Figure 5 It is a simulation detail diagram of the present invention. DETAILED DESCRIPTION

[0084] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention is described clearly and completely below. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0085] like Figure 1-3 As shown, a cage-type electric throttle valve opening control method of the present invention comprises the following steps:

[0086] Step 1. State Estimation

[0087] The displacement, velocity and acceleration of the valve core obtained by the position detection transmitter are used to estimate the actual state of the valve according to the Kalman filter algorithm, and the result of the state estimation is used as an input of the model predictive controller.

[0088] Step 2. Design an improved RBF neural network compensator

[0089] The results after state estimation in step 1 and the results obtained by the position detection transmitter are used to output the nonlinear compensation part through the improved learning algorithm of the RBF neural network, thereby improving the accuracy of the system and outputting the compensation amount with its excellent ability to approximate nonlinearity and self-adjust.

[0090] Step 3. Design a model predictive controller for valve positioning

[0091] The result after state estimation is compared with the set value as the input of the reference trajectory, and is transmitted to the model predictive controller together with the nonlinear compensation part in step 2. The model predictive controller is used to output the control quantity, and finally the valve opening is controlled according to the control quantity output by the model predictive controller.

[0092] Furthermore, step 1 specifically includes:

[0093] Step 1.1) Given the state variable in the Kalman filter: displacement p k , speed v k , acceleration a k ; a k As the control quantity, x k is the state variable, let

[0094] Step 1.2) Given the state transfer matrix and control matrix in the Kalman filter: Since

[0095]

[0096] v k =v k-1+a k ΔT;

[0097] but The state transfer matrix Control Matrix ΔT is the time interval.

[0098] Step 1.3) From step 1.1 and step 1.2, the state prediction equation can be obtained as follows:

[0099]

[0100] in is the prior estimate at time k, is the prior estimate at time k-1. Since the prediction contains noise, it brings uncertainty and needs to be estimated.

[0101] Step 1.4) Given the prior error covariance matrix in the Kalman filter: The state equation including noise is:

[0102] x k =Fx k-1 +Ba k+ ω k-1 ;

[0103] ω k-1 is the process noise, and the process noise ω is set k-1 If it conforms to the normal distribution, its expectation is 0, and its covariance matrix is ​​Q. Substitute the state equation and state prediction equation into The prior error covariance matrix can be obtained as follows: is the prior error covariance matrix, and E is the expectation:

[0104]

[0105] in is the prior error, that is, the error between the state value and the prior estimate.

[0106] Step 1.5) Given the measurement equation containing measurement noise in the Kalman filter: Similar to the state prediction equation, there is also uncertainty caused by noise in the measurement equation, so the measurement equation containing these two noises is:

[0107]

[0108] Among them, Z k is represented by the measurement value, H is the measurement matrix, To measure noise, its expectation is 0.

[0109] Step 1.6) Posterior estimation equation: Since both process noise and measurement noise are uncertain, the state prediction equation and measurement equation that can be used for modeling are:

[0110]

[0111] Z k =Hx k ;

[0112] According to the idea of ​​data fusion, the posterior estimation equation is:

[0113]

[0114] at this time is the optimal estimate, where K k is the Kalman gain.

[0115] Step 1.7) Kalman gain and update error covariance matrix equation: Kalman gain can be obtained by It is concluded that Substitute the posterior estimation equation and the measurement equation, and the goal of the solution is to find K k Make the estimated value tend to the actual value, that is, find K k So that tr(P k ) is the smallest, that is, the variance is the smallest. Finally, the Kalman gain can be obtained as:

[0116]

[0117] Where R is the covariance matrix corresponding to the measurement noise.

[0118] Substituting the Kalman gain back The updated error covariance matrix equation can be obtained as:

[0119]

[0120] I is the identity matrix, K k is the Kalman gain, P k is the updated error covariance matrix;

[0121] Whether the task is completed is determined based on whether the state meets the valve opening control requirements. If not, compensation is performed based on the current state through the improved RBF neural network compensator, and the motor is controlled by the output of the model predictive controller, thereby completing the control of the valve opening and continuing with step 1.2) for state estimation.

[0122] Furthermore, step 2 specifically includes:

[0123] The K-means algorithm, the subtractive clustering algorithm and the particle swarm optimization algorithm are integrated as the learning algorithm of the RBF neural network. First, the number of clusters is determined by subtractive clustering and the initial cluster center is determined by the K-means algorithm. Then all the parameters of the RBF neural network are obtained by the K-means algorithm, which is expanded as the initial particle swarm. Finally, the particle swarm optimization algorithm is used to optimize and obtain the optimal solution. The compensation amount is output through the RBF neural network's own approximate nonlinearity and self-adjustment capabilities, thereby achieving the role of nonlinear compensation.

[0124] Furthermore, step 3 specifically includes:

[0125] Step 3.1 Estimate the current system state and control quantity and write them into state equations:

[0126]

[0127] x(k)=[θ(k),p(k),v(k)] T ;

[0128]

[0129] Where y represents the output, is a pure fitting function, θ is the valve opening, p is the displacement, v is the speed, For current.

[0130] u(k) represents the control quantity, is the current at time k;

[0131] θ(k) is the valve opening at time k, p(k) is the displacement at time k, and v(k) is the velocity at time k;

[0132] Substituting the above formula into the discrete state space expression, the state equation is:

[0133]

[0134]

[0135] Where x(k+1) is the state vector at time k+1, u(k) is the input vector at time k, x(k) is the state vector at time k as the initial condition setting value, and y(k) is the output vector. and They are the state matrix, input matrix and output coefficient matrix of the system respectively. At this time, the opening, displacement and speed are used as state variables, and the current is used as the control variable.

[0136] Step 3.2: Determine the prediction time domain and control time domain: The system model is optimized based on u(k), u(k+1), ..., u(k+N). At time k, based on the input vector u(k) and the initial condition state vector x(k), the value of x(k+1) at the next time, i.e., time k+1, can be predicted, thereby predicting the value of the output y(k+1). Similarly, at time k+1, based on u(k+1), the value of x(k+2) at the next time, i.e., time k+2, can be predicted using the state vector x(k+1). Thus, the value of the output y(k+2) can be predicted. Similarly, the values ​​of y(k+3), y(k+4), ..., y(k+N-1) can be predicted. At time k+N-1, based on the input vector u(k+N-1) and the state vector x(k+N-1), the value of x(k+N) at time k+N can be predicted, thereby predicting the value of y(k+N) at time k+N. Let

[0137]

[0138]

[0139] Where X k It is a matrix composed of the initial condition state vector at time k and the state vector predicted at time k (e.g. x(k+1 / k)). k It is a matrix composed of the input vector at time k and the input vector predicted at time k (e.g. u(k+1 / k)). N is the prediction time domain, N=3, 4, 5, 6, 7.

[0140] Estimate the current state of the system, construct a cost function for the discrete state model, and take its minimum value to achieve the optimization purpose. Cost function:

[0141]

[0142] The error E(k+i / k)=x(k+i / k)-r, r is the reference value, i=0,1,2,...,N, are all diagonal matrices, is the weighted sum of errors, is the weighted sum of the inputs, is the final error. To obtain the general form of quadratic programming: The standard form of X k and U k X k =Mx(k)+Cu(k), open the cost function J and get Substitute X k =Mx(k)+Cu(k) we can get,

[0143]

[0144]

[0145]

[0146] are the state matrix and input matrix of the system respectively, is the error adjustment matrix, is the terminal error adjustment matrix, is the input adjustment matrix, where It can be regarded as a constant related to the initial state, and all coefficient matrices All can be obtained through calculation.

[0147] Step 3.3: Rolling optimization control: obtain u(k), u(k+1), u(k+2), ... u(k+N-1) through calculation, take only the first data u(k) into the system, and move the prediction time domain and control time domain backward by one unit to continue the prediction, and so on until the system output stabilizes at the reference value, thus realizing rolling optimization control.

[0148] Step 3.4: The compensation value in step 2 and the state estimation value of the Kalman filter are compared with the set value and the value after passing through the reference trajectory is superimposed as the input of the model predictive controller. After optimization processing by the model predictive controller, the output control value controls the motor to achieve control of the valve opening.

[0149] The control method of the present invention and the traditional PID control algorithm are used to perform simulation experiments on valve opening control, and the control effect is shown in the following example: Figure 4 , Figure 5 shown.

[0150] Experimental conclusion: Compared with the traditional PID control algorithm, the control method provided by the present invention has small overshoot and fast adjustment time.

[0151] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for controlling the valve opening of a cage-type electric throttle valve, characterized in that: The following steps are involved: Step 1. State Estimation The displacement, velocity and acceleration of the valve core are obtained by using the position detection transmitter and the actual state of the valve is estimated based on the Kalman filter algorithm. Step 1 specifically includes: Step 1.

1. Given the state variable in the Kalman filter: displacement p k , speed v k , acceleration a k ; a k As the control quantity, x k is the state variable, let Step 1.

2. Given the state transfer matrix and control matrix in the Kalman filter: because v k =v k-1 +a k ΔT; but The state transfer matrix Control Matrix ΔT is the time interval; Step 1.

3. The state prediction equation obtained from steps 1.1 and 1.2 is: in is the prior estimate at time k, is the prior estimate at time k-1. Since the prediction contains noise, it brings uncertainty, so it needs to be estimated; Step 1.

4. Given the prior error covariance matrix: The state equation including noise is: k =Fx k-1 +Ba k +ω k-1 ; ω k-1 is the process noise, and the process noise ω is set k-1 If it conforms to the normal distribution, its expectation is 0, and its covariance matrix is ​​Q. Substitute the state equation and state prediction equation into The prior error covariance matrix is: is the prior error covariance matrix, E is the expectation, where is the prior error, that is, the error between the state value and the prior estimate; Step 1.

5. Given the measurement equation in the Kalman filter including the measurement noise: Similar to the state prediction equation, there is also uncertainty caused by noise in the measurement equation, so the measurement equation including measurement noise is: Z k Expressed as measurement values, where H is the measurement matrix, is the measurement noise, whose expectation is 0; Step 1.

6. Posterior estimation equation: Since both process noise and measurement noise are uncertain, the state prediction equation and measurement equation used for modeling are: Z k =Hx k ; According to the idea of ​​data fusion, the posterior estimation equation is: at this time is the optimal estimate, where K k is the Kalman gain; Step 1.

7. Kalman gain and updated error covariance matrix equation The Kalman gain is given by It is concluded that Substitute the posterior estimation equation and the measurement equation, and the goal of the solution is to find K k Make the estimated value tend to the actual value, that is, find K k So that tr(P k ) is the smallest, that is, the variance is the smallest, and finally the Kalman gain is: R is the covariance matrix corresponding to the measurement noise, and the Kalman gain is substituted back into The updated error covariance matrix equation is: I is the identity matrix, K k is the Kalman gain, P k is the updated error covariance matrix; Whether the task is completed is determined based on whether the state meets the valve opening control requirements. If not, compensation is performed based on the current state through the improved RBF neural network compensator, and the motor is controlled by the output of the model predictive controller, thereby completing the control of the valve opening, and continuing with step 1.2 for state estimation; Step 2. Design an improved RBF neural network compensator The nonlinear part improves the system accuracy by improving the learning algorithm of the RBF neural network, and outputs the compensation amount with its excellent ability to approximate nonlinearity and self-adjust. Step 2 specifically includes: The K-means algorithm, the subtractive clustering algorithm and the particle swarm optimization algorithm are integrated as the learning algorithm of the RBF neural network. First, the number of clusters is determined by the subtractive clustering algorithm and the initial cluster center is determined by the K-means algorithm. Then, all the parameters of the RBF neural network are obtained by the K-means algorithm, which is expanded as the initial particle swarm. Finally, the particle swarm optimization algorithm is used to optimize and obtain the optimal solution. The compensation amount is output through the RBF neural network's own approximate nonlinearity and self-adjustment capabilities, thereby achieving the role of nonlinear compensation. Step 3. Design a model predictive controller for valve positioning The compensation amount of the improved RBF neural network compensator and the output amount of the reference trajectory are used as input quantities; the control amount is output by the model predictive controller, and finally the valve opening is controlled according to the control amount output by the model predictive controller; Step 3 specifically includes: Step 3.

1. Estimate the current system state and control variables and write them into state equations: x(k=[θ(k),p(k),v(k)] T ; Where y represents the output, is a pure fitting function, θ is the valve opening, p is the displacement, v is the speed, is the current; u(k) represents the control quantity, is the current at time k, θ(k) is the valve opening at time k, p(k) is the displacement at time k, and v(k) is the velocity at time k; Substituting the above formula into the discrete state space expression, the state equation is: Where x(k+1) is the state vector at time k+1, u(k) is the input vector at time k, x(k) is the state vector at time k as the initial condition setting value, and y(k) is the output vector. and They are the state matrix, input matrix and output coefficient matrix of the system respectively. At this time, the opening, displacement and speed are used as state variables, and the current is used as the control variable. Step 3.

2. Determine the prediction horizon and control horizon The system model is optimized based on u(k), u(k+1), ..., u(k+N). At time k, based on the input vector u(k) and the initial condition state vector x(k), the value of x(k+1) at the next time, i.e., time k+1, is predicted, thereby predicting the value of the output y(k+1). Similarly, at time k+1, based on u(k+1), the value of x(k+2) at the next time, i.e., time k+2, is predicted using the state vector x(k+1). Thus, the value of the output y(k+2) is predicted. Similarly, the values ​​of y(k+3), y(k+4), ..., y(k+N-1) are predicted by analogy. At time k+N-1, based on the input vector u(k+N-1) and the state vector x(k+N-1), the value of x(k+N) at time k+N is predicted, thereby predicting the value of y(k+N) at time k+N. Let Where X k It is a matrix composed of the initial condition state vector at time k and the state vector predicted at time k for the future. k It is a matrix composed of the input vector at time k and the input vector predicted at time k, where N is the prediction time domain, N = 3, 4, 5, 6, 7; Estimate the system state at the current moment, construct a cost function for the discrete state model, and take its minimum value to achieve the optimization purpose. The cost function is: The error E(k+i / k)=x(k+i / k)-r, r is the reference value, i=0,1,2,...,N, are all diagonal matrices, is the error weight, is the weighted sum of the inputs, is the final error, and the general form of the quadratic programming is obtained: The standard form of X k and U k Get X k =Mx(k)+Cu(k), open the cost function J and get Substitute X k =Mx(k)+Cu(k) to obtain, is the error adjustment matrix, is the terminal error adjustment matrix, is the input adjustment matrix, where All coefficient matrices C, M, G, L, All are obtained through calculation; Step 3.

3. Rolling optimization control: By calculating u(k), u(k+1), u(k+2), ..., u(k+N-1), only the first data, i.e., u(k), is taken into the system, and the prediction time domain and the control time domain are moved back one unit to continue the prediction, and so on until the system outputs a stable reference value, thus realizing rolling optimization control; Step 3.

4. The compensation value in step 2 and the state estimation value of the Kalman filter are compared with the set value and the value after passing through the reference trajectory is superimposed as the input of the model predictive controller. After optimization processing by the model predictive controller, the output control value controls the motor to achieve control of the valve opening.