Flowmeter valve control method based on neural network
Through the flowmeter valve control method based on RBF neural network, the limitations of traditional control methods in complex nonlinear systems are solved, efficient and accurate flow control is achieved, and the dynamic response speed and control accuracy of the system are improved.
Patent Information
- Application Number
- CN202411725844.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-28
- Publication Date
- 2025-03-04
AI Technical Summary
Traditional flow control methods are difficult to achieve efficient and precise control when facing complex nonlinear systems, especially when dealing with nonlinear and time-varying characteristics.
The flowmeter valve control method based on RBF neural network is adopted, and the controlled object model is dynamically predicted in real time through the adaptive learning and nonlinear approximation capabilities of the RBF neural network, and the parameters of the PID controller are dynamically adjusted according to the prediction results, and finally the real-time flow is controlled through the piezoelectric valve.
It significantly improves the flexibility and robustness of the control system, can maintain efficient and precise control performance under different working conditions and environments, improves control accuracy and efficiency, and ensures the stable operation of the system under complex working conditions.
Smart Images

Figure CN119556564A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a flow control method, and more specifically, to a flow meter valve control method based on a neural network. Background Art
[0002] Traditional flow control methods often have difficulty achieving efficient and precise control when faced with complex nonlinear systems. These methods, including the classic proportional-integral-derivative (PID) controller and fuzzy controller, perform well in many simple and linear systems, but show obvious limitations when dealing with nonlinear and time-varying characteristics. The parameter adjustment of the PID controller is complex and it is difficult to adapt to the dynamic changes of highly nonlinear and time-varying systems. Its control accuracy is difficult to meet the needs under complex working conditions. Fuzzy controllers handle uncertainty and ambiguity through fuzzy logic, but the design process of its fuzzy rules is cumbersome and it is difficult to cover all possible system states. In addition, its adaptive ability is limited when faced with rapidly changing environments.
[0003] Existing control algorithms face many challenges in practice, especially when dealing with complex nonlinear systems in industrial sites. For example, the nonlinear effects caused by factors such as valve dynamic characteristics, medium compressibility, and pipeline friction in flow control systems make it difficult for traditional control methods to achieve the expected control accuracy and stability. In addition, these methods also have bottlenecks in real-time and adaptability, and cannot quickly respond to changes in system status, nor do they have the ability to learn and optimize online. Summary of the invention
[0004] In order to achieve the purpose of the present invention, a flow meter valve control method based on a neural network is proposed to overcome the limitations of traditional control methods in nonlinear and time-varying systems. The present invention uses the adaptive learning and nonlinear approximation capabilities of the RBF neural network to achieve precise control of the flow meter valve, improve the dynamic response speed and control accuracy of the system, and ensure the stable operation of the system under complex working conditions.
[0005] The technical solution adopted by the present invention is: a flow meter valve control method based on neural network, including: the flow meter sensor uses RBF neural network to perform real-time dynamic prediction on the controlled object model, and dynamically adjusts the parameters of the flow meter's PID controller according to the prediction results, and finally controls the real-time flow through the piezoelectric valve.
[0006] Preferably, it includes: S1. Construction of adaptive PID control system structure based on RBF neural network; S2. Establish the simulation model of the flow meter itself and obtain the transfer function; S3, establishment of the simulation model of the whole system; S4. Conduct simulation analysis on the modeled control system; S5. The model is exported and transplanted to the flow meter.
[0007] Preferably, it includes: S201, collecting input data and output data in the flow meter control system, that is, the corresponding output signal of the sensor when controlling the valve opening; S202, dividing the collected data into a training data set and a verification data set, the training set is used to train the neural network, and the verification set is used to verify the performance of the network model; S203, using the neural network toolbox in MATLAB, defining a neural network model, and fitting it using the training data; S204: After the training is completed, the transfer function is output to prepare for the next step of establishing a simulation model of the entire system.
[0008] Preferably, a large amount of sensor and valve sample data is obtained through the RBF neural network, the total error of all sample data is calculated according to the error function, and finally the weight is updated according to the total error; The total error is calculated as follows:
[0009] E is the error function, K is the output node number, d is the expected output, and O is the actual output.
[0010] Preferably, in the RBF neural network structure, the output of the neural network is calculated by the following formula:
[0011]
[0012] Among them, is the input vector of the RBF neural network, b i (i=1,2,3,4) is the base width of the i-th node in the hidden layer; represents the center vector of the i-th node in the hidden layer, w j ( j = 1,2,3,4) represents the connection weight from the jth node to the output layer, y m The output of the neural network, the radial basis vector of the RBF neural network h=[h1, h2, …, h m ] T ,h j is the Gaussian basis function.
[0013] Preferably, a gradient descent algorithm is used as the learning algorithm, and the performance indicator function is positioned as:
[0014] Among them, y out ( k ) is the expected output, k represents the recursive depth; define η as the learning rate and α as the inertia factor, then the weight w of the RBF network is j (k), node base width b j (k) and the node vector Cji(k) will be updated as follows:
[0015]
[0016] . Preferably, RBFNN is used for PID parameter tuning, and the input vector of the RBF neural network is the standard adopted for PID parameter tuning as follows:
[0018]
[0019]
[0020]
[0021]
[0022]
[0023] Where u(k) is the output of the PID controller, u is the input vector, and k p (0) is the default value of kp, k i (0) is k i The default value of k d (0) is k d The preset value of Δk p、 Δk i、 Δk d All are increments, y ref (k) is the expected target output, e is the error, ∂ is the partial differential symbol, and E ( k ) is used to adjust the PID parameter k p , k i and k d performance function.
[0024] Compared with the prior art, the present invention has the following beneficial effects: 1. The adaptive characteristics of RBF neural network enable it to maintain efficient and accurate control performance under different working conditions and environments. By training and optimizing network parameters, RBF neural network can learn the dynamic characteristics of the system online and adjust the control strategy in real time, thereby significantly improving the flexibility and robustness of the control system. Compared with traditional PID controllers and fuzzy controllers, RBF neural network can handle complex nonlinear systems more effectively and provide higher control accuracy and efficiency.
[0025] 2. The introduction of RBF neural network not only solves the problem of nonlinear processing in traditional control methods, but also makes it easy to integrate and expand in practical applications through modular design, and can be easily combined with other control systems to further improve the level of industrial automation. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] Figure 1 It is a flow chart of the RBF neural network control system of the present invention; Figure 2 is a structural diagram of a neural network of the present invention; Figure 3 An exploded view of the overall structure of the building block connection kit of the present invention; Figure 4 It is a function fitting diagram of the neural network model training data of the present invention; Figure 5 A simulation control model of the flow meter of the present invention; Figure 6 The data diagram of the response speed of the system and the resistance to disturbance of the simulation model of the present invention in various states; Figure 7 This is a control effect diagram after the simulation model of the present invention is transplanted to the flow meter; Figure 8 This is a diagram showing the effect of the RBF neural network control method of the present invention on external disturbances. DETAILED DESCRIPTION
[0027] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only 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.
[0028] Example: Figures 1 to 8As shown, the present invention provides a technical solution: a flow meter valve control method based on a neural network, in which the sensor of the flow meter uses an RBF neural network to perform real-time dynamic prediction on the controlled object model, and dynamically adjusts the parameters of the PID controller of the flow meter according to the prediction results, and finally controls the real-time flow through a piezoelectric valve.
[0029] Among them, the weight correction method of the RBF neural network adopts the offline weight adjustment method, which is a pre-batch training method. After obtaining a large amount of sensor and valve sample data, the neural network calculates the total error of all sample data according to the error function, and then updates the weight. This method can predetermine the topological structure of the network and can be flexibly integrated into the intelligent algorithm. The error calculation formula is as follows:
[0030] E is the error function, K is the output node number, d is the expected output, and O is the actual output.
[0031] When offline RBF neural network is applied to control system, although training sample data needs to be generated in advance and the initialization time is long, the computational complexity of the control link is very small, it can quickly predict and respond, and perform feedback control through the control link, which is suitable for situations with relatively high sampling frequency.
[0032] The flow meter valve control method based on neural network includes: S1. Construction of adaptive PID control system structure based on RBF neural network; S2. Establish the simulation model of the flow meter itself and obtain the transfer function; S201, collecting input data and output data in the flow meter control system, that is, the corresponding output signal of the sensor when controlling the valve opening; Among them, a large amount of sensor and valve sample data is obtained through the RBF neural network, the total error of all sample data is calculated according to the error function, and finally the weight is updated according to the total error; The total error is calculated as follows:
[0033] E is the error function, K is the output node number, d is the expected output, and O is the actual output; S202, dividing the collected data into a training data set and a verification data set, the training data set is used to train the neural network, and the verification data set is used to verify the performance of the network model; Among them, in the RBF neural network structure, the output of the neural network is calculated by the following formula:
[0034]
[0035] Among them, is the input vector of the RBF neural network, b i (i=1,2,3,4) is the base width of the i-th node in the hidden layer; represents the center vector of the i-th node in the hidden layer, w j ( j = 1,2,3,4) represents the connection weight from the jth node to the output layer, y m The output of the neural network, the radial basis vector of the RBF neural network h=[h1, h2, …, h m ] T ,h j is the Gaussian basis function.
[0036] The gradient descent algorithm is used as the learning algorithm, and the performance indicator function is positioned as:
[0037] Among them, y out ( k ) is the expected output, k represents the recursive depth; define η as the learning rate and α as the inertia factor, then the weight w of the RBF network is j (k), node base width b j (k) and the node vector Cji(k) will be updated as follows:
[0038]
[0039]
[0040] S203, using the neural network toolbox in MATLAB, defining a neural network model, and fitting it using the training data; Among them, RBFNN is used for PID parameter tuning, and the input vector of RBF neural network is the standard adopted for PID parameter tuning as follows:
[0041]
[0042]
[0043]
[0044]
[0045]
[0046] Where u(k) is the output of the PID controller, u is the input vector, and k p (0) is the default value of kp, k i (0) is k i The default value of k d (0) is k d The preset value of Δk p、 Δk i、 Δk d All are increments, y ref (k) is the expected target output, e is the error, ∂ is the partial differential symbol, and E ( k ) is used to adjust the PID parameter k p , k i and k d performance function.
[0047] S204: After the training is completed, the transfer function is output to prepare for the next step of establishing a simulation model of the entire system.
[0048] S3, establishment of the simulation model of the whole system; Among them, the RBF neural network incremental PID control algorithm is programmed and implemented using the S function under MATLAB / Simulink, and is introduced into the simulation control model of the flow meter. p , K i , K d They are the proportional, integral, and differential coefficients of the incremental PID controller. The RBF neural network can predict the system response model in real time during operation and adjust these three coefficients in real time according to the prediction results.
[0049] S4. Conduct simulation analysis on the modeled control system; Among them, after obtaining the transfer function according to the response model of the flow meter, the transfer function is filled into the simulation model of the whole system, the simulation parameters are set, the target flow is given at the beginning of the simulation, and disturbance is added to the system at 1S to observe the response speed of the system and the resistance to disturbance in various states. It is obtained that the RBF neural network has a significant improvement in the response speed of the system, and can respond faster when dealing with interference, and will not overshoot too much. It can follow the input signal well and has strong adaptability and robustness.
[0050] S5. The model is exported and transplanted to the flow meter.
[0051] After transplanting to the flow meter, the control effect is as follows Figure 7: The yellow line is the sensor measurement signal (due to the physical characteristics of the thermal flowmeter, the sensor response time is slow), the blue line is the change time of the target flow, and the green line is the valve control amount. It can be seen that the valve has adjusted the PID parameters by the neural network based on the empirical value within 0.5S and has been controlled in place.
[0052] The performance of RBF neural network control strategy for external disturbances is as follows Figure 8 , the green line is the pressure disturbance, the blue line is the flow signal, and the yellow line is the valve control quantity. It can be seen that with the occurrence of disturbances, the valve can quickly resist the disturbances and return to a steady state.
[0053] The embodiments of the present invention disclose preferred embodiments, but are not limited thereto. A person skilled in the art can easily understand the spirit of the present invention based on the above embodiments and make different extensions and changes. However, as long as they do not deviate from the spirit of the present invention, they are all within the protection scope of the present invention.
Claims
1. A flow meter valve control method based on neural network, characterized in that: include: The flow meter sensor uses RBF neural network to make real-time dynamic predictions on the controlled object model, and dynamically adjusts the parameters of the flow meter's PID controller based on the prediction results, and finally controls the real-time flow through the piezoelectric valve.
2. The flow meter valve control method based on neural network according to claim 1, characterized in that: include: S1. Construction of adaptive PID control system structure based on RBF neural network; S2. Establish the simulation model of the flow meter itself and obtain the transfer function; S3, establishment of the simulation model of the whole system; S4. Conduct simulation analysis on the modeled control system; S5. The model is exported and transplanted to the flow meter.
3. The flow meter valve control method based on neural network according to claim 2 is characterized in that: include: S201, collecting input data and output data in the flow meter control system, that is, the corresponding output signal of the sensor when controlling the valve opening; S202, dividing the collected data into a training data set and a verification data set, the training set is used to train the neural network, and the verification set is used to verify the performance of the network model; S203, using the neural network toolbox in MATLAB, defining a neural network model, and fitting it using the training data; S204: After the training is completed, the transfer function is output to prepare for the next step of establishing a simulation model of the entire system.
4. The flow meter valve control method based on neural network according to claim 2 is characterized in that: Obtain a large amount of sensor and valve sample data through RBF neural network, calculate the total error of all sample data according to the error function, and finally update the weight according to the total error; The total error is calculated as follows: E is the error function, K is the output node number, d is the expected output, O is the actual output, and L is the total number of output nodes.
5. The flow meter valve control method based on neural network according to claim 4 is characterized in that: In the RBF neural network structure, the output of the neural network is calculated by the following formula: Among them, is the input vector of the RBF neural network, b i ( i =1,2,3,4) is the base width of the i-th node in the hidden layer; represents the center vector of the i-th node in the hidden layer, w j ( j = 1,2,3,4) represents the connection weight from the jth node to the output layer, y m The output of the neural network, the radial basis vector of the RBF neural network h=[h1, h2, …, h m ] T ,h j is the Gaussian basis function.
6. The flow meter valve control method based on neural network according to claim 5, characterized in that: The gradient descent algorithm is used as the learning algorithm, and the performance indicator function is positioned as: Among them, y out (k) is the expected output, k represents the recursive depth; define η as the learning rate and α as the inertia factor, then the weight w of the RBF network is j (k), node base width b j (k) and the node vector Cji(k) will be updated as follows: w j (k)=w j (k−1)+η(y out (k)-y m ( k )) h j +α(w j (k-1)-w j (k-2)) b j (k)=b j (k-1)+ηΔb j +α(b j (k-1)-b j (k-2)) 7. The flow meter valve control method based on neural network according to claim 6, characterized in that: PID using RBFNN Parameter tuning, the input vector of the RBF neural network is the standard adopted for PID parameter tuning as follows: Where u(k) is the output of the PID controller, u is the input vector, and k p (0) is the default value of kp, k i (0) is k i The default value of k d (0) is k d The preset value of Δk p、 Δk i、 Δk d All are increments, y ref (k) is the expected target output, e is y out -y ref The error, ∂ is the partial differential sign, E ( k ) is used to adjust the PID parameter k p , k i and k d performance function.
Citation Information
Cited By
Non-contact pipeline fluid flow velocity measurement method based on neural network model
CN120369984A
Intelligent control method and device of flow field simulation system, storage medium and computer equipment
CN121008485A