A method for dynamically optimizing and adjusting control parameters of intelligent valve positioner
Through the combination of reinforcement learning network and parameter self-tuning module, the intelligent valve positioner dynamically optimizes control parameters when the environment changes, solving the problem of control performance degradation, achieving adaptive and optimal control, and avoiding valve shutdown maintenance.
Patent Information
- Application Number
- CN202210768974.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-30
- Publication Date
- 2024-09-20
- Estimated Expiration
- 2042-06-30
AI Technical Summary
When the working environment and valve body structure of the intelligent valve positioner change, the control parameters cannot be adjusted adaptively, resulting in a decline in control performance and making it difficult to avoid valve shutdown for maintenance.
The reinforcement learning network is used to continuously iteratively learn to optimize the control parameters of the intelligent valve positioner. The control strategy is adjusted according to the dynamic response index of the pneumatic control valve to achieve optimal control performance. The required control parameters are obtained through the parameter self-tuning module and the control valves are divided The control process is a fast zone, fine-tuning zone and buffer zone, and dynamically optimizes PWM and speed.
It realizes the adaptive ability of the intelligent valve positioner under environmental changes, improves the control performance, avoids shutdown maintenance of the valve, enhances the adaptability of the closed-loop control strategy, and achieves the optimal control effect.
Smart Images

Figure CN115163910B
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of industrial instruments and process control, and in particular relates to a method for dynamically optimizing and adjusting control parameters of an intelligent valve positioner. Background Art
[0002] Control valves are the terminal actuators for process control in process industries and are widely used in metallurgy, energy, chemical industry, petroleum, military, water conservancy and other industrial sectors. According to the different actuators, control valves can be divided into pneumatic control valves, electric control valves and hydraulic control valves.
[0003] The valve positioner is the core accessory that controls the opening of the control valve to match the control command, and together with the control valve, it forms a closed-loop control system. The valve positioner changes the control quantity in real time according to the error signal (control signal-valve position feedback signal), and drives the control valve opening to stabilize at the specified position. Among them, the valve positioner is divided into pneumatic valve positioner, electro-pneumatic valve positioner and intelligent electro-pneumatic valve positioner, and the intelligent valve positioner can realize digital control, real-time communication, dynamic interaction, decision-making analysis, realize the intelligent upgrade of the control valve, and promote the deep integration of the new generation of informatization and industrialization. According to the different I / P conversion units, the intelligent valve positioner is divided into piezoelectric intelligent valve positioner and nozzle baffle intelligent valve positioner. Among them, the piezoelectric type uses PWM to control the intake and exhaust of the control valve, with strong shock resistance and low gas consumption. Therefore, the piezoelectric intelligent valve positioner has gradually become the mainstream of the control valve market.
[0004] In the control of intelligent control valves, the working performance of the control valve is mainly measured by static characteristics and dynamic characteristics, and the internal algorithm of the intelligent valve positioner plays a decisive role in the control performance. The control algorithm directly affects the working energy consumption, control accuracy, and adjustment speed of the control valve. Due to the different working environments of the control valves, the structural characteristics of the valve body change with the increase of running time. Therefore, after the self-tuning of the intelligent valve positioner parameters is initialized, if the control parameters of the control algorithm cannot be adaptively adjusted with the changes in external conditions, the control performance will be reduced.
[0005] The purpose of the present invention is to optimize and learn the control parameters of the intelligent valve positioner in real time during the operation of the piezoelectric pneumatic control valve according to the working state of the pneumatic control valve when the working environment, valve body structure, etc. change, so as to realize the self-adaptation of the control parameters according to the operating state, achieve optimal control, and avoid shutdown maintenance of the control valve. Summary of the invention
[0006] The present invention is aimed at a pneumatic control valve with a piezoelectric intelligent valve positioner. In order to improve the control performance of the control algorithm and the adaptability under environmental changes, a method for dynamically optimizing and adjusting the control parameters of the intelligent valve positioner is proposed. The control method uses a reinforcement learning network to continuously iterate and learn, so that the control parameters of the closed-loop control algorithm can adapt to changes in the valve body, working environment and other conditions, thereby achieving dynamic optimization of the control parameters and achieving optimal control performance.
[0007] The present invention specifically comprises the following steps to achieve:
[0008] Step A1: The required control parameters are adjusted through the parameter self-tuning module, including the maximum overshoot, the minimum start-up PWM, the minimum displacement and the minimum speed.
[0009] Step A2: Divide the control process into a fast zone, a fine-tuning zone and a buffer zone according to the control valve error signal and the control parameters, and perform closed-loop control of the control valve. If the closed-loop control valve time is greater than the maximum closed-loop adjustment time threshold, the control is interrupted and a fault alarm is issued.
[0010] Step A3: During the operation of the control valve, the dynamic response index of the control valve is learned online. If the response index of the control valve does not meet the specified value, the control parameters are dynamically optimized based on the reinforcement learning network to achieve optimal control of the control valve.
[0011] Furthermore, the parameter self-tuning module described in step A1 obtains the required control parameters, and the specific implementation steps are as follows:
[0012] Step B1: First, Bang-Bang control drives the pneumatic control valve to exhaust until the valve position moves to the lowest end, and records the current position as zero position pos_zero, and the time before recording is recorded as t1. Then Bang-Bang control drives the pneumatic control valve to inlet air until the valve position moves to the highest end, and records the current position as full position pos_full, and the current time is recorded as t2. The actual stroke of the pneumatic control valve POS_FSR = |pos_full-pos_zero|, and the full adjustment time is t FSR =|t2-t1|.
[0013] Step B2: Control the pneumatic control valve to exhaust and move the pneumatic control valve position to zero position pos_zero. Define the displacement threshold pos_thr = 0.2% POS_FSR; define the minimum pneumatic PWM in the intake stage as pwm_for, and set the initial value to 5%; define the pwm gain step as pwm_step, and set the default value to pwm_step = 1%. Collect the valve position feedback value pos_val in real time, and determine whether |pos_val-pos_zero|>=pos_thr is satisfied. If not, pwm_for+=pwm_step, until |pos_val-pos_zero|>=pos_thr, record the current PWM as the minimum starting PWM in the intake stage, recorded as pwm_for. Delay t delay After that, Bang-Bang control drives the pneumatic control valve to intake air until the control valve reaches the full position pos_full. Similarly, the self-tuning obtains the minimum starting PWM of the exhaust stage, which is recorded as pwm_back. delay is the time in seconds, t delay The value range is 0-10%t FSR .
[0014] Step B3: Bang-Bang control drives the valve position to reach pos_zero, delay t delay After that, the pwm_for obtained by self-tuning in step B2 is used as the PWM control signal to drive the valve stem to move. The current valve position pos_val is obtained in each sampling cycle, and the valve position at the previous moment is recorded as pos_val_bef. The current valve position speed pos_vel is defined as |pos_val-pos_val_bef|, and the valve position speed at the previous moment is pos_vel_bef. Then, under the PWM=pwm_for control signal, the valve position feedback value reaching the final position of the valve position is recorded as pos_val_for, and the minimum speed of the regulating valve in the intake stage pos_vel_for_min=Math.max(pos_vel,pos_vel_bef), and the minimum displacement up min =|pos_val_for-pos_zero|. Delay t delay After that, the drive valve position reaches the full position pos_full. Similarly, the self-tuning obtains the minimum speed pos_vel_back_min and the minimum displacement down in the exhaust stage when PWM = pwm_back. min . Where t delay is the time in seconds, t delay The value range is 0-10%t FSR .
[0015] Step B4: Drive the valve position to pos_zero, delay tdelay The post-Bang-Bang control drives the regulating valve to move inlet air. The real-time valve position speed of the regulating valve is pos_vel as defined in step B3. The current valve position pos_val and current valve position speed pos_vel of the regulating valve are collected in real time. The maximum speed of the regulating valve inlet air is defined as vel_up. The initial value is set to 0. The position corresponding to the maximum speed is pos_up_max. If pos_vel is greater than vel_up, vel_up = pos_vel, pos_up_max = pos_val, until the valve position reaches the full position pos_full. Delay t delay After that, the driving valve position reaches the full position pos_full, and similarly, the self-tuning obtains the maximum speed vel_down in the exhaust stage and the position corresponding to the maximum speed pos_down_max. delay is the time in seconds, t delay The value range is 0-10%t FSR .
[0016] Step B5: Drive the valve position to pos_zero, delay t delay After that, the Bang-Bang control drives the regulating valve to move inlet, and the current valve position pos_val is collected in real time. When the valve position reaches the maximum valve speed position pos_up_max obtained in step B4, PWM=0 until the regulating valve stops moving and the current valve position pos_val is recorded. The maximum overshoot in the intake stage δ up =|pos_val-pos_up_max|. Delay t delay After that, the drive valve position reaches the full position pos_full. Similarly, the self-tuning obtains the maximum overshoot value δ in the exhaust stage. down . Where t delay is the time in seconds, t delay The value range is 0-10%t FSR .
[0017] Furthermore, the closed-loop control described in step A2 is specifically implemented as follows:
[0018] Step C1: The user gives the target valve position control signal I ctr , record the current given time of the target control signal as t ctr From step B1, we can know that the zero position pos_zero and the full position pos_full define the target valve position Among them I ctr is the current in mA, I ctr The value range is 4-20mA.
[0019] Step C2: Real-time acquisition of the current valve position as pos_val, the target valve position pos_tar, the valve position error e = pos_tar-pos_val, and the absolute error e_abs = |pos_tar-pos_val|. The control process of the regulating valve is divided into the intake stage and the exhaust stage according to the valve position error e. If e<0, it is the exhaust stage, and if e>0, it is the intake stage. According to the absolute error, the control process is divided into the fast zone, the fine-tuning zone, and the buffer zone. The switching points of each control stage are obtained by self-tuning in step A1, where the maximum overshoot δ up ,δ down It is the switching point between the fast zone and the fine adjustment zone, and the minimum displacement is up min 、down min As the switching point between the fine-tuning zone and the buffer zone, the dead zone range of the control valve is defined as -0.02POS_FSR≤dead≤0.02POS_FSR.
[0020] Step C3: When the absolute error of the regulating valve e_abs≤0.02POS_FSR, set PWM=0 to keep the regulating valve position stable at the target position.
[0021] Step C4: When e_abs>δ up , then let When e_abs<-δ down , then let Among them, pwm_for and pwm_down are the minimum startup pwm obtained by self-tuning in step B1.
[0022] Step C5: When e_abs<δ up or e_abs>-δ down When the valve position speed is less than the minimum speed obtained by self-tuning in step B3, when e_abs<δ up , let PWM = pwm_for + αpwm_temp, where pwm_temp = 0.5pwm_for, When e_abs>-δ down , let PWM = pwm_down + αpwm_temp, where When the valve position speed is greater than the minimum speed, set PWM = 0 until the absolute error enters the buffer zone.
[0023] Step C6: When e_abs<up min or e_abs>-dowm min , then set PWM = 0, so that the valve position uses its own inertia to enter the dead zone and reach the target valve position.
[0024] Step C7: Record the current time as t in real time now , if tnow -t ctr >3t FSR The closed-loop control is interrupted and a fault alarm is issued. Otherwise, it is determined whether the absolute error of the valve position e_abs reaches the dead zone. If e_abs≤0.02POS_FSR, the process proceeds to step C3. If e_abs≥0.02POS_FSR, the process proceeds to steps C4 to C6. FSR The total adjustment time obtained from step B1, 3t FSR It is the maximum threshold of closed-loop regulation time.
[0025] Furthermore, step A3 of the dynamic optimization of the control parameters of the reinforcement learning network is specifically implemented as follows:
[0026] The piezoelectric intelligent valve positioner controls the movement of the pneumatic control valve and obtains the response indicators of the pneumatic control valve: valve position error, maximum overshoot, adjustment time, etc., which are used as the state input of the reinforcement learning network.
[0027] The valve position error e = pos_tar-pos_val; the maximum overshoot Where pos_val_max is the maximum valve position value in the step response stage; the adjustment time satisfies |pos_val(t s )-pos_tar|≤0.02POS_FSR, where t s To adjust the time, pos_val(t s ) indicates t s Always adjust the valve position value.
[0028] The intelligent valve positioner generates a step control signal to drive the pneumatic control valve to move, and then records the current state S t , S t ∈S, where {e, σ%, t s}∈S t , S is the state set.
[0029] The reinforcement learning network is based on the current state S t Produce action A t :π(a|s).
[0030] The strategy π represents the mapping between the state of the reinforcement learning network and the probability of action selection, and π(a|s) represents the probability of action selection when S t =s, A t = the probability of a, where S t is the current state, A t For the reinforcement learning network in state S t The action output under step A2 is the control parameters of the closed-loop control strategy involved in step A2. In the intake stage, {pwm_for, pos_vel_for_min, upmin ,δ up}∈A t , exhaust stage {pwm_back,pos_vel_back_min,down min ,δ down}∈A t , A t ∈A, A is the action set,
[0031] in,
[0032] Current Status t Only with the previous state S t-1 and the previous action A t-1 In the current state S t , generating action A t , and generate reward r(s,a), calculate the reward function R t :
[0033]
[0034]
[0035] Where R t Represents the current reward, For the reward collection, s′,s∈S,a∈A,S t-1 Indicates the state at the previous moment, A t-1 Indicates the action that occurred in the previous state.
[0036] The specific reward function is designed as follows:
[0037]
[0038] Where e represents the error value of the regulating valve, POS_FSR is the actual travel range of the regulating valve, and when the error value is less than the dead zone 0.02POS_FSR, the reward value is obtained by adjusting the time t s Determined by the overshoot σ%, when t s The smaller σ% is, the greater the reward value is; when the error value is 0.02POS_FSR<|e|≤0.15POS_FSR, the reward value decreases as the error increases; when the error value |e|>0.15POS_FSR, the reward value is negative.
[0039] The reinforcement learning network iterates learning through rewards and continuously adjusts the parameters of the reinforcement learning network so that the reward R t Reached maximum value.
[0040] According to the response index of the pneumatic control valve, the corresponding action is output to update the control parameters in the intelligent valve positioner control algorithm. Through continuous iterative learning of the reinforcement learning network, the reward in the whole process is maximized, and then the optimal control parameters of the closed-loop control strategy are obtained. When the operating environment or the state of the control valve changes, the dynamic optimization of the control parameters in the closed-loop control strategy is realized through the reinforcement learning network, the adaptability of the closed-loop control strategy is enhanced, and finally the closed-loop control algorithm achieves optimal control. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] Figure 1 Overall process diagram of the present invention.
[0042] Figure 2 It is the schematic diagram of closed-loop control strategy.
[0043] Figure 3 It is a schematic diagram of the control parameter dynamic optimization algorithm of the method of the present invention.
[0044] Figure 4 It is the basic framework diagram of reinforcement learning. DETAILED DESCRIPTION
[0045] The technical solution of the present invention is described in detail below in conjunction with the accompanying drawings.
[0046] like Figure 1 As shown, a method for dynamically optimizing and adjusting the control parameters of an intelligent valve positioner specifically includes the following steps:
[0047] Step A1: Use the parameter self-tuning module to tune the required control parameters, including maximum overshoot, minimum start-up PWM, minimum displacement and minimum speed, specifically:
[0048] Step B1: First, Bang-Bang control drives the pneumatic control valve to exhaust until the valve position moves to the lowest end, and records the current position as zero position pos_zero, and the time before recording is recorded as t1. Then Bang-Bang control drives the pneumatic control valve to inlet air until the valve position moves to the highest end, and records the current position as full position pos_full, and the current time is recorded as t2. The actual stroke of the pneumatic control valve POS_FSR = |pos_full-pos_zero|, and the full adjustment time is t FSR =|t2-t1|.
[0049] Step B2: Control the pneumatic control valve to exhaust and move the pneumatic control valve position to zero position pos_zero. Define the displacement threshold pos_thr = 0.2% POS_FSR; define the minimum pneumatic PWM in the intake stage as pwm_for, and set the initial value to 5%; define the pwm gain step as pwm_step, and set the default value to pwm_step = 1%. Collect the valve position feedback value pos_val in real time, and determine whether |pos_val-pos_zero|>=pos_thr is satisfied. If not, pwm_for+=pwm_step, until |pos_val-pos_zero|>=pos_thr, record the current PWM as the minimum starting PWM in the intake stage, recorded as pwm_for. Delay t delay After that, Bang-Bang control drives the pneumatic control valve to intake air until the control valve reaches the full position pos_full. Similarly, the self-tuning obtains the minimum starting PWM of the exhaust stage, which is recorded as pwm_back. delay is the time in seconds, t delay The value range is 0-10%t FSR .
[0050] Step B3: Bang-Bang control drives the valve position to reach pos_zero, delay t delay After that, the pwm_for obtained by self-tuning in step B2 is used as the PWM control signal to drive the valve stem to move. The current valve position pos_val is obtained in each sampling cycle, and the valve position at the previous moment is recorded as pos_val_bef. The current valve position speed pos_vel is defined as |pos_val-pos_val_bef|, and the valve position speed at the previous moment is pos_vel_bef. Then, under the PWM=pwm_for control signal, the valve position feedback value reaching the final position of the valve position is recorded as pos_val_for, and the minimum speed of the regulating valve in the intake stage pos_vel_for_min=Math.max(pos_vel,pos_vel_bef), and the minimum displacement up min =|pos_val_for-pos_zero|. Delay t delay After that, the drive valve position reaches the full position pos_full. Similarly, the self-tuning obtains the minimum speed pos_vel_back_min and the minimum displacement down in the exhaust stage when PWM = pwm_back. min . Where t delay is the time in seconds, t delay The value range is 0-10%t FSR .
[0051] Step B4: Drive the valve position to pos_zero, delay tdelay The post-Bang-Bang control drives the regulating valve to move inlet air. The real-time valve position speed of the regulating valve is pos_vel as defined in step B3. The current valve position pos_val and current valve position speed pos_vel of the regulating valve are collected in real time. The maximum speed of the regulating valve inlet air is defined as vel_up. The initial value is set to 0. The position corresponding to the maximum speed is pos_up_max. If pos_vel is greater than vel_up, vel_up = pos_vel, pos_up_max = pos_val, until the valve position reaches the full position pos_full. Delay t delay After that, the driving valve position reaches the full position pos_full, and similarly, the self-tuning obtains the maximum speed vel_down in the exhaust stage and the position corresponding to the maximum speed pos_down_max. delay is the time in seconds, t delay The value range is 0-10%t FSR .
[0052] Step B5: Drive the valve position to pos_zero, delay t delay After that, the Bang-Bang control drives the regulating valve to move inlet, and the current valve position pos_val is collected in real time. When the valve position reaches the maximum valve speed position pos_up_max obtained in step B4, PWM=0 until the regulating valve stops moving and the current valve position pos_val is recorded. The maximum overshoot in the intake stage δ up =|pos_val-pos_up_max|. Delay t delay After that, the drive valve position reaches the full position pos_full. Similarly, the self-tuning obtains the maximum overshoot value δ in the exhaust stage. down . Where t delay is the time in seconds, t delay The value range is 0-10%t FSR .
[0053] Step A2: Divide the control process into a fast zone, a fine-tuning zone and a buffer zone according to the control valve error signal and control parameters, and perform closed-loop control of the control valve. If the closed-loop control valve time is greater than the maximum closed-loop adjustment time threshold, the control is interrupted and a fault alarm is processed, specifically:
[0054] Step C1: The user gives the target valve position control signal I ctr , record the current given time of the target control signal as t ctr From step B1, we know that the zero position pos_zero and the full position pos_full define the target valve position Among them I ctr is the current in mA, I ctr The value range is 4-20mA.
[0055] Step C2: Real-time acquisition of the current valve position as pos_val, the target valve position as pos_tar, the valve position error e = pos_tar-pos_val, and the absolute error e_abs = |pos_tar-pos_val|. According to the valve position error e, the control process of the regulating valve is divided into the intake stage and the exhaust stage. If e<0, it is the exhaust stage, and if e>0, it is the intake stage. The closed-loop control strategy of the regulating valve is as follows: Figure 2 As shown in the figure, the control process is divided into a fast zone, a fine-tuning zone, and a buffer zone according to the absolute error. The switching points of each control stage are obtained by self-tuning in step A1, where the maximum overshoot δ up ,δ down It is the switching point between the fast zone and the fine adjustment zone, and the minimum displacement is up min 、down min As the switching point between the fine-tuning zone and the buffer zone, the dead zone range of the control valve is defined as -0.02POS_FSR≤dead≤0.02POS_FSR.
[0056] Step C3: When the absolute error of the regulating valve e_abs≤0.02POS_FSR, set PWM=0 to keep the regulating valve position stable at the target position.
[0057] Step C4: When e_abs>δ up , then let When e_abs<-δ down , then let Among them, pwm_for and pwm_down are the minimum startup pwm obtained by self-tuning in step B1.
[0058] Step C5: When e_abs<δ up or e_abs>-δ down When the valve position speed is less than the minimum speed obtained by self-tuning in step B3, when e_abs<δ up , let PWM = pwm_for + αpwm_temp, where pwm_temp = 0.5pwm_for, When e_abs>-δ down , let PWM = pwm_down + αpwm_temp, where When the valve position speed is greater than the minimum speed, set PWM = 0 until the absolute error enters the buffer zone.
[0059] Step C6: When e_abs<up min or e_abs>-dowm min , then set PWM = 0, so that the valve position uses its own inertia to enter the dead zone and reach the target valve position.
[0060] Step C7: Record the current time as t in real time now , if t now -t ctr >3t FSR The closed-loop control is interrupted and a fault alarm is issued. Otherwise, it is determined whether the absolute error of the valve position e_abs reaches the dead zone. If e_abs≤0.02POS_FSR, the process proceeds to step C3. If e_abs≥0.02POS_FSR, the process proceeds to steps C4 to C6. FSR The total adjustment time obtained from step B1, 3t FSR It is the maximum threshold of closed-loop regulation time.
[0061] The method for dynamically optimizing and adjusting the control parameters of the intelligent valve positioner of the present invention has the following principles for the dynamic optimization algorithm of the control parameters: Figure 3 shown.
[0062] Step A3: During the operation of the control valve, the dynamic response index of the control valve is learned online. If the response index of the control valve does not meet the specified value, the control parameters are dynamically optimized based on the reinforcement learning network to achieve optimal control of the control valve. Specifically,
[0063] The basic framework of reinforcement learning network is as follows Figure 4 As shown, the intelligent valve positioner controls the movement of the pneumatic control valve and obtains the response indicators of the pneumatic control valve: valve position error, maximum overshoot, adjustment time, etc., which are used as the state input of the reinforcement learning network.
[0064] The valve position error e = pos_tar-pos_val; the maximum overshoot Where pos_val_max is the maximum valve position value in the step response stage; the adjustment time satisfies |pos_val(t s )-pos_tar|≤0.02POS_FSR, where t s To adjust the time, pos_val(t s ) indicates t s Always adjust the valve position value.
[0065] The intelligent valve positioner generates a step control signal to drive the pneumatic control valve to move, and then records the current state S t , S t ∈S, where {e, σ%, t s}∈S t , S is the state set.
[0066] The reinforcement learning network is based on the current state S t Produce action A t :π(a|s).
[0067] The strategy π represents the mapping between the state of the reinforcement learning network and the probability of action selection, and π(a|s) represents the probability of action selection when S t =s, A t = the probability of a, where S t is the current state, A t For the reinforcement learning network in state S t The action output under step A2 is the control parameters of the closed-loop control strategy involved in step A2. In the intake stage, {pwm_for, pos_vel_for_min, up min ,δ up}∈A t , exhaust stage {pwm_back,pos_vel_back_min,down min ,δ down}∈A t , A t ∈A, A is the action set,
[0068] in,
[0069] Current Status t Only with the previous state S t-1 and the previous action A t-1 In the current state S t , generating action A t , and generate reward r(s,a), calculate the reward function R t :
[0070]
[0071]
[0072] Where R t Represents the current reward, For the reward collection, s′,s∈S,a∈A,S t-1 Indicates the state at the previous moment, A t-1 Indicates the action that occurred in the previous state.
[0073] The specific reward function is designed as follows:
[0074]
[0075] Where e represents the error value of the regulating valve, POS_FSR is the actual travel range of the regulating valve, and when the error value is less than the dead zone 0.02POS_FSR, the reward value is obtained by adjusting the time t s Determined by the overshoot σ%, when t sThe smaller σ% is, the greater the reward value is; when the error value is 0.02POS_FSR<|e|≤0.15POS_FSR, the reward value decreases as the error increases; when the error value |e|>0.15POS_FSR, the reward value is negative.
[0076] The reinforcement learning network iterates learning through rewards and continuously adjusts the parameters of the reinforcement learning network so that the reward R t Reached maximum value.
[0077] According to the response index of the pneumatic control valve, the corresponding action is output to update the control parameters in the intelligent valve positioner control algorithm. Through continuous iterative learning of the reinforcement learning network, the reward in the whole process is maximized, and then the optimal control parameters of the closed-loop control strategy are obtained. When the operating environment or the state of the control valve changes, the dynamic optimization of the control parameters in the closed-loop control strategy is realized through the reinforcement learning network, the adaptability of the closed-loop control strategy is enhanced, and finally the closed-loop control algorithm achieves optimal control.
[0078] The above contents are further detailed descriptions of the present invention in combination with specific preferred embodiments, and it cannot be determined that the specific implementation of the present invention is limited to these descriptions. For ordinary technicians in the technical field to which the present invention belongs, several simple deductions or substitutions can be made without departing from the inventive concept, which should be regarded as falling within the protection scope of the present invention.
Claims
1. A method for dynamically optimizing and adjusting the control parameters of an intelligent valve positioner. Features: The specific implementation includes the following steps: Step A1: The required control parameters are adjusted through the parameter self-tuning module, including the maximum overshoot, the minimum start PWM, the minimum displacement and the minimum speed; The parameter self-tuning module described in step A1 obtains the required control parameters, and the specific implementation steps are as follows: Step B1: First, the Bang-Bang control drives the pneumatic regulating valve to exhaust until the valve position moves to the lowest end position, and the current position is recorded as zero position pos_zero, and the time before recording is recorded as t 1 ; Then Bang-Bang control drives the pneumatic regulating valve to intake air until the valve position moves to the highest end, and the current position is recorded as the full position pos_full, and the current time is recorded as t 2 ; Actual stroke of pneumatic control valve POS_FSR = |pos_full-pos_zero|, full adjustment time t FSR =|t 2 -t 1 |; Step B2: Control the pneumatic control valve to exhaust, so that the pneumatic control valve position moves to zero position pos_zero; define the displacement threshold pos_thr = 0.2% POS_FSR; define the minimum pneumatic PWM in the intake stage as pwm_for, and set the initial value to 5%; define the pwm gain step as pwm_step, and set the default value to pwm_step = 1%; collect the valve position feedback value pos_val in real time, and determine whether |pos_val-pos_zero|>=pos_thr is satisfied. If not, pwm_for+=pwm_step, until |pos_val-pos_zero|>=pos_thr, record the current PWM as the minimum starting PWM in the intake stage, recorded as pwm_for; delay t delay After that, Bang-Bang control drives the pneumatic control valve to intake air until the control valve reaches the full position pos_full. Similarly, the self-tuning obtains the minimum starting PWM of the exhaust stage, which is recorded as pwm_back; where t delay is the time in seconds, t delay The value range is 0-10%t FSR ; Step B3: Bang-Bang control drives the valve position to reach pos_zero, delay t delay After that, the pwm_for obtained by self-tuning in step B2 is used as the PWM control signal to drive the valve stem to move. The current valve position pos_val is obtained in each sampling period, and the valve position at the previous moment is recorded as pos_val_bef. The current valve position speed pos_vel is defined as |pos_val-pos_val_bef|, and the valve position speed at the previous moment is pos_vel_bef; then under the PWM=pwm_for control signal, the valve position feedback value reaching the final position of the valve position is recorded as pos_val_for, then the minimum speed of the regulating valve in the intake stage pos_vel_for_min=Math.max(pos_vel,pos_vel_bef), and the minimum displacement up min =|pos_val_for-pos_zero|; delay t delay After that, the drive valve position reaches the full position pos_full. Similarly, the self-tuning obtains the minimum speed pos_vel_back_min and the minimum displacement down in the exhaust stage when PWM = pwm_back. min ; where t delay is the time in seconds, t delay The value range is 0-10%t FSR ; Step B4: Drive the valve position to pos_zero, delay t delay The post-Bang-Bang control drives the regulating valve to move inlet air. The real-time valve position speed of the regulating valve is pos_vel as defined in step B3. The current valve position pos_val and the current valve position speed pos_vel of the regulating valve are collected in real time. The maximum speed of the regulating valve inlet air is defined as vel_up, and the initial value is set to 0. The position corresponding to the maximum speed is pos_up_max. If pos_vel is greater than vel_up, vel_up = pos_vel, pos_up_max = pos_val, until the valve position reaches the full position pos_full. Delay t delay After that, the driving valve position reaches the full position pos_full. Similarly, the self-tuning obtains the maximum speed vel_down in the exhaust stage and the position corresponding to the maximum speed pos_down_max; where t delay is the time in seconds, t delay The value range is 0-10%t FSR ; Step B5: Drive the valve position to pos_zero, delay t delay After that, the Bang-Bang control drives the regulating valve to move inlet, and the current valve position pos_val is collected in real time. When the valve position reaches the maximum valve speed position pos_up_max obtained in step B4, PWM=0 until the regulating valve stops moving and the current valve position pos_val is recorded. The maximum overshoot in the intake stage δ up =|pos_val-pos_up_max|; delay t delay After that, the drive valve position reaches the full position pos_full. Similarly, the self-tuning obtains the maximum overshoot value δ in the exhaust stage. down ; where t delay is the time in seconds, t delay The value range is 0-10%t FSR ; Step A2: Divide the control process into a fast zone, a fine-tuning zone and a buffer zone according to the control valve error signal and the control parameters, and perform closed-loop control of the control valve; if the closed-loop control valve time is greater than the maximum closed-loop adjustment time threshold, interrupt the control and issue a fault alarm. The specific implementation strategy of the closed-loop control described in step A2 is: Step C1: The user gives the target valve position control signal I ctr , record the current given time of the target control signal as t ctr ; From step B1, we know that the zero position pos_zero, the full position pos_full, define the target valve position Among them I ctr is the current in mA, I ctr The value range is 4-20mA; Step C2: Real-time acquisition of the current valve position as pos_val, the target valve position pos_tar, the valve position error e=pos_tar-pos_val, and the absolute error e_abs=|pos_tar-pos_val|; the regulating valve control process is divided into the intake stage and the exhaust stage according to the valve position error e, e<0, then it is the exhaust stage, e>0, then it is the intake stage; according to the absolute error, the control process is divided into the fast zone, the fine-tuning zone, and the buffer zone. The switching point of each control stage is obtained by self-tuning in step A1, where the maximum overshoot δ up ,δ down It is the switching point between the fast zone and the fine adjustment zone, and the minimum displacement is up min 、down min The dead zone range of the regulating valve is defined as -0.02POS_FSR≤dead≤0.02POS_FSR, which is the switching point between the fine-tuning zone and the buffer zone. Step C3: When the absolute error of the regulating valve e_abs≤0.02POS_FSR, set PWM=0 to keep the regulating valve position stable at the target position; Step C4: When e_abs>δ up , then let When e_abs<-δ down , then let Where pwm_for and pwm_down are the minimum startup pwm obtained by self-tuning in step B1; Step C5: When e_abs<δ up or e_abs>-δ down When the valve position speed is less than the minimum speed obtained by self-tuning in step B3, when e_abs<δ up , let PWM = pwm_for + αpwm_temp, where pwm_temp = 0.5pwm_for, When e_abs>-δ down , let PWM = pwm_down + αpwm_temp, where When the valve position speed is greater than the minimum speed, set PWM = 0 until the absolute error enters the buffer zone; Step C6: When e_abs<up min or e_abs>-dowm min , then set PWM = 0, so that the valve position uses its own inertia to enter the dead zone, thereby reaching the target valve position; Step C7: Record the current time as t in real time now , if t now -t ctr >3t FSR If the valve position absolute error e_abs reaches the dead zone, the closed-loop control is interrupted and a fault alarm is issued. If the valve position absolute error e_abs reaches the dead zone, the process goes to step C3. If the valve position absolute error e_abs reaches the dead zone, the process goes to step C4 to C6. FSR The total adjustment time obtained from step B1, 3t FSR It is the maximum threshold of closed-loop regulation time; Step A3: During the operation of the control valve, the dynamic response index of the control valve is learned online. If the response index of the control valve does not meet the specified value, the control parameters are dynamically optimized based on the reinforcement learning network to achieve optimal control of the control valve. Step A3: Dynamic optimization of control parameters of reinforcement learning network is specifically implemented as follows: The piezoelectric intelligent valve positioner controls the movement of the pneumatic control valve and obtains the pneumatic control valve response indicators: valve position error, maximum overshoot, adjustment time, etc., which are used as the state input of the reinforcement learning network; The valve position error e = pos_tar-pos_val; the maximum overshoot Where pos_val_max is the maximum valve position value in the step response stage; the adjustment time satisfies |pos_val(t s )-pos_tar|≤0.02POS_FSR, where t s To adjust the time, pos_val(t s ) indicates t s Adjust the valve position value at all times; The intelligent valve positioner generates a step control signal to drive the pneumatic control valve to move, and then records the current state S t , S t ∈S, where {e, σ%, t s }∈S t , S is the state set; The reinforcement learning network is based on the current state S t Produce action A t :π(a|s); The strategy π represents the mapping between the state of the reinforcement learning network and the probability of action selection, and π(a|s) represents the probability of action selection when S t =s, A t = the probability of a, where S t is the current state, A t For the reinforcement learning network in state S t The action output under step A2 is the control parameters of the closed-loop control strategy involved in step A2. In the intake stage, {pwm_for, pos_vel_for_min, up min ,δ up }∈A t , exhaust stage {pwm_back,pos_vel_back_min,down min ,δ down }∈A t , A t ∈A, A is the action set, in, Current Status t Only with the previous state S t-1 and the previous action A t-1 Related; in the current state S t , generating action A t , and generate reward r(s,a), calculate the reward function R t : Where R t Represents the current reward, For the reward collection, s′,s∈S,a∈A,S t-1 Indicates the state at the previous moment, A t-1 Indicates the action produced in the previous state; The specific reward function is designed as follows: Where e represents the error value of the regulating valve, POS_FSR is the actual travel range of the regulating valve, and when the error value is less than the dead zone 0.02POS_FSR, the reward value is obtained by adjusting the time t s Determined by the overshoot σ%, when t s The smaller , the greater the reward value; when the error value is 0.02POS_FSR<|e|≤0.15POS_FSR, the reward value obtained decreases as the error increases; when the error value |e|>0.15POS_FSR, the reward value is negative; The reinforcement learning network iterates learning through rewards and continuously adjusts the parameters of the reinforcement learning network so that the reward R t Reach the maximum value; According to the response index of the pneumatic control valve, the corresponding action is output to update the control parameters in the intelligent valve positioner control algorithm. Through continuous iterative learning through the reinforcement learning network, the reward in the whole process is maximized, and then the optimal control parameters of the closed-loop control strategy are obtained; when the operating environment or the state of the control valve changes, the dynamic optimization of the control parameters in the closed-loop control strategy is realized through the reinforcement learning network, the adaptability of the closed-loop control strategy is enhanced, and finally the closed-loop control algorithm achieves optimal control.
