PID (Proportion Integration Differentiation) control method suitable for large-lag multiple working conditions based on feedforward compensation
By adopting a feedforward compensation-based PID control method in the heating furnace, and dynamically adjusting the control quantity in the system working conditions and historical data, the poor adaptability and complicated parameter adjustment of the traditional PID control method in the large hysteresis and multiple working conditions are solved, and the problem of poor parameter adjustment of traditional PID control method is achieved. The precise and efficient control of the heating furnace temperature has been improved, and the automation and energy utilization efficiency of the system have been improved.
Patent Information
- Application Number
- CN202410880140.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-02
- Publication Date
- 2024-11-05
AI Technical Summary
The existing PID control method has complicated parameter setting and poor effect in the temperature control of heating furnaces, which cannot be corrected online, resulting in poor adaptability to the controlled process, especially in the face of large hysteresis, time-varying and nonlinear factors. control.
Using the PID control method based on feedforward compensation, the actual temperature and target temperature are measured by the temperature sensor to calculate the control deviation, the gas flow control volume is dynamically adjusted in combination with the system working condition status and historical data, and the rapid cooling compensation is performed using segmented linear fitting technology. , and predict future errors to optimize controller increments, improving system responsiveness and adaptability.
Effectively improve the robustness and dynamic response capability of the heating furnace temperature control, reduce temperature fluctuations and hysteresis, realize accurate gas flow control, improve the automation and intelligence level of the system, reduce manual intervention, and significantly save energy.
Smart Images

Figure CN118897450A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence technology, and in particular to a PID control method based on feedforward compensation and applicable to large lag and multiple working conditions. Background Art
[0002] Wellhead heating, water mixing, hot washing, water-containing oil export from oil transfer stations, crude oil dehydration at joint stations, crude oil stabilization, refined oil export, winter heating and heating, etc. all rely on heating furnaces. The main function of heating furnaces is to heat crude oil medium and promote its flow and transmission in pipelines. Therefore, fast, accurate and stable automatic temperature control for heating furnaces is a pain point and main challenge that needs to be solved in the process of heating furnace management and control. First, due to the serious lag in the temperature control operation of oilfield heating furnaces, high experience requirements for on-site operators, time-consuming and labor-intensive, irregular and unscientific operation will lead to a large amount of energy consumption; secondly, external interference and other factors are often encountered in daily production processes, such as changes in well liquid, changes in combustion room gas, and changes in boiler process parameters, etc. These interference factors greatly affect the stable control of temperature; finally, there are many processes in oilfield production, and process switching will cause sudden changes in medium flow, control targets, etc. The above factors such as large lag, time-varying, nonlinearity, and sudden changes in variables during production make it quite difficult to establish an accurate mathematical model of the heating furnace production process.
[0003] Traditionally, heating is achieved by manually adjusting the temperature of the heating furnace control medium, but this process is highly dependent on the skills and experience of the operator. Conventional PID control is widely used in industrial process control such as heating furnaces due to its simple algorithm and good robustness. However, in actual production, the parameter setting of conventional PID control is complicated and time-consuming, and there is usually a problem of poor setting effect. Once the parameters are set, they cannot be corrected online according to changes in system conditions, and the adaptability to the controlled process is poor. Summary of the invention
[0004] The purpose of the present invention is to address the deficiencies in the prior art and provide a PID control method based on feedforward compensation suitable for large lag and multiple working conditions, so as to solve the problems that the parameter setting of conventional PID control is complicated and time-consuming, and the setting effect is usually poor. Once the parameters are set, they cannot be corrected online according to changes in the system working conditions, and the adaptability to the controlled process is poor.
[0005] The present invention provides a PID control method based on feedforward compensation and applicable to large hysteresis and multiple working conditions, comprising:
[0006] Step 1: At each sampling period, the actual temperature measurement value of the outlet temperature of the heating medium in the heating furnace is measured by a temperature sensor; the control deviation is calculated according to the actual temperature measurement value and the preset target temperature value; the PID current increment is calculated according to the control deviation and the PID parameters, and the PID parameters include a proportional coefficient, an integral coefficient and a differential coefficient;
[0007] Step 2: By analyzing the system operating status and historical data, the current working status is determined and the status label is dynamically assigned to the control logic;
[0008] Step 3: Using historical operation data, calculate and analyze the appropriate recommended control quantity of the gas flow of the heating furnace under different temperature targets according to different operating conditions of the system; use the recommended control quantity model to feedforward compensate the control quantity and adjust the control quantity in time;
[0009] Step 4: Based on the current system state, control deviation and historical data, the rapid temperature rise and fall compensation amount is dynamically adjusted through piecewise linear fitting technology to compensate the control amount;
[0010] Step 5: At each lag time interval, linear fitting is performed on the current system state and historical data to predict future errors, and the future incremental compensation of the PID controller is adjusted accordingly;
[0011] Step 6: Combine the system status tags and historical data to calculate and summarize the output of each increment to optimize the gas flow control of the system.
[0012] In step 1, the actual temperature measurement value at the kth moment is recorded as T(k), and the target temperature value is set as T set (k), the control deviation is e(k)=T set (k)-T(k);
[0013] PID current increment ΔU now The expression of (k) is as follows:
[0014] ΔU now (k) = K p [e(k)-e(k-1)]+K i e(k)+K d [e(k)-2e(k-1)+e(k-2)]
[0015] Among them, K p is the proportionality coefficient, K i is the integration coefficient, K d is the differential coefficient;
[0016] The three parameters K of PID p , K i and K dUse the following formula to calculate:
[0017]
[0018] in:
[0019] Q max The maximum gas flow rate allowed for the heating furnace;
[0020] Q min The minimum gas flow rate allowed for the heating furnace;
[0021] T max The maximum temperature allowed by the heating furnace;
[0022] T min The lowest temperature allowed by the heating furnace;
[0023] t d is the transfer lag time of the heating furnace system;
[0024] t r is the rise time of the heating furnace system;
[0025] V max The maximum heating rate allowed for the medium.
[0026] In step 2, the lag time is τ = t d +t r , at the kth moment, determine which category the system operating condition belongs to;
[0027] Initial heating stage: When the time when the heating furnace system starts to control the heating temperature is less than the system lag time τ, or when the time in the most recently saved data point is discontinuous, it means that the system is reconnected to the control after interruption of control, and the operating state label is σ(k) = 1;
[0028] Target temperature change stage: current set temperature T set (k) and the set temperature T at the previous moment set (k-1) is inconsistent, T set (k)≠T set (k-1), the operating state label is σ(k)=2;
[0029] There is medium flow data and the actual temperature gradually approaches the target temperature stage: the current medium flow is greater than 0, and the continuous time that the medium flow is greater than 0 is less than the system lag time τ, and the system meets one of the following conditions:
[0030] The current control deviation e(k)>0, and the current heating rate V(k)>0;
[0031] The current control deviation e(k) is less than 0, and the current heating rate V(k) is less than 0;
[0032] The operating state label is σ(k)=3;
[0033] There is medium flow data and the actual temperature tends to be stable: the current medium flow is greater than 0, and the continuous time of the medium flow greater than 0 is greater than or equal to the system lag time τ, and the operating state label is σ(k) = 4;
[0034] Process switching stage: when the hot washing process switches to the water mixing process, when the medium flow rate changes from greater than 0 to 0, the operating state label is σ(k) = 5;
[0035] When the temperature is near the target: when the control deviation ||e(k)||<δ, δ is the allowable deviation threshold, and the operating state label is σ(k)=0;
[0036] Exceeding the lag time stage: When the most recent operating condition labels σ are all 1 or 2, and the time length exceeds the lag time τ, the operating condition state label is σ(k) = 0;
[0037] No recommended control amount stage: If the recommended control amount model of the gas flow has no result at the target temperature or the recommended control amount is 0, the operating state label is σ(k) = 0;
[0038] Continuation phase: If any of the above conditions are not met, the operating state label is σ(k) = σ(k-1).
[0039] In step 3, the construction process of the recommended control quantity model is as follows:
[0040] Obtain actual temperature-medium flow-gas flow historical data set;
[0041] Set the time window W, set the time window W equal to the control system lag time τ, and set the sliding step size S;
[0042] Perform sliding window calculation on the temperature time series to find relatively stable segments;
[0043] Perform a straight line fit on the temperature series in each window and calculate the phase-intersection area A;
[0044] Select the window segment corresponding to the minimum phase-intersection area, and calculate the average value of the time series in the window;
[0045] Generate optimal control points;
[0046] Further screen the best control point set that meets the current conditions;
[0047] Calculate the weighted recommended control amount.
[0048] In step 4, the allowable error threshold is δ=2. During the production process, when the absolute value of the control deviation ||e||>δ, the control amount will be temporarily added with the rapid temperature rise compensation ΔU quick-up Or rapid cooling compensation ΔU quick-down ;
[0049] Check whether the time length from the start of control to the current data is less than the lag time τ; if so, perform linear fitting, and α and β are the slope and intercept of the fitting line respectively; if not, perform linear fitting in two sections, and after calculating and finding the optimal segmentation point, α and β are the slope and intercept of the second fitting line respectively;
[0050] Using the slope α and intercept β of the fitting line, predict the predicted temperature at the current time k after a lag time k+τ
[0051] Calculating the prediction bias
[0052] When the control deviation e>δ, the rapid temperature rise compensation ΔU quick-up =K p max(e,e p );
[0053] When the control deviation e<-δ, the rapid cooling compensation ΔU quick-down =K p ·min(e,e p );
[0054] In other cases, ΔU quick-up =ΔU quick-down =0;
[0055] In order to ensure that the rapid temperature rise and fall compensation amount meets the safety and rationality of the upper and lower limits of the heating furnace, the compensation amount is limited in range:
[0056] If ΔU quick-up >Q max -Q min , reset to Q max -Q min ;
[0057] If ΔU quick-up <0, reset to 0;
[0058] If ΔU quick-down <-(Q max -Q min ), reset to -(Q max -Q min );
[0059] If ΔU quick-down >0, reset to 0.
[0060] In step 5, if the current time k is the end point of the lag time, the following steps are performed to calculate the future incremental compensation ΔU future :
[0061] Check whether the time length from the start of control to the current data is less than the lag time τ; if so, perform linear fitting, and α and β are the slope and intercept of the fitting line respectively; if not, perform linear fitting in two sections, and after calculating and finding the optimal segmentation point, α and β are the slope and intercept of the second fitting line respectively;
[0062] Using the slope α and intercept β of the fitted line, we can predict the current moment k after half the lag time. Predicted temperature
[0063] Calculating the prediction bias
[0064] Future incremental compensation ΔU future =K p ·e p ;
[0065] At other times (k mod τ≠0), ΔU future =0.
[0066] In step 6, when σ∈{1,2,3,4}, and the weighted recommended control quantity U w (k)≠0, then judge and calculate in sequence:
[0067] If σ=1 and ||e||<δ,
[0068] U′(k)=U′(k-1)+ΔU now (k)+ΔU future (k)
[0069] U(k)=U′(k)+ΔU quick-up (k)+ΔU quick-down (k);
[0070] If e(k)>V max ·τ and V(k)<V max ,
[0071] U(k)=Q max , Q max is the maximum gas flow rate;
[0072] If e(k)<-V max ·τ and V(k)>0,
[0073] U(k)=Q min , Q min is the minimum gas flow rate;
[0074] if And V(k)>0,
[0075] U(k)=U w (k)+K p e(k);
[0076] if And V(k)>0,
[0077] U(k)=U w (k);
[0078] In other cases,
[0079] U′(k)=U w (k)+∑ΔU now (k)+∑ΔU future (k)
[0080] U(k)=U′(k)+ΔU quick-up (k)+ΔU quick-down (k);
[0081] when or U w (k)=0, then
[0082] U′(k)=U′(k-1)+ΔU now (k)+ΔU future (k)
[0083] U(k)=U′(k)+ΔU quick-up (k)+ΔU quick-down (k);
[0084] Limit U(k) to the minimum gas flow Q min and maximum gas flow Q max between:
[0085] If U(k)<Q min , set U(k) = Q min ;
[0086] If U(k)>Q max , set U(k) = Q max
[0087] The beneficial effects of the present invention are as follows: The PID control method based on feedforward compensation of the present invention, which is applicable to large lag and multiple working conditions, has the following advantages:
[0088] Strong robustness and ability to solve large lag problems: The present invention effectively solves the problem of intelligent temperature control of the heating furnace, avoids reliance on manual skills and experience, and improves the automation and intelligence level of the system.
[0089] Dynamic response and multi-process adaptability: The control algorithm combined with big data modeling technology can respond to the complex and changeable operating conditions of the oil field in a timely manner. It adapts to the switching of multiple processes and external interference, including changes in target temperature and sudden changes in heating medium flow, ensuring that the system can quickly adjust the gas flow to stabilize the temperature of the heating medium and achieve the control effect required for production.
[0090] Feedforward compensation and real-time control: Using feedforward compensation technology, the system can predict and adjust the control amount in advance, effectively reducing the hysteresis of control. In the event of a sudden change in the medium flow or other emergencies, the system can respond quickly, reduce the hysteresis and temperature fluctuation of the PID control algorithm, and ensure that the actual temperature is stable within the target range.
[0091] Historical data utilization and precise control: By analyzing historical operating data, a recommended control quantity model under different temperature targets is constructed to provide precise control quantity maintenance values for maintaining actual temperature. The system can dynamically adjust the control strategy according to different operating conditions, optimize the output gas flow, reduce temperature fluctuations and lag time, and improve control accuracy.
[0092] Intelligent and autonomous regulation: The present invention provides an intelligent control solution that can automatically adjust the control compensation amount, reduce human intervention, and improve the system's autonomous regulation ability. The system can achieve precise temperature control of the heating furnace, improve operating efficiency, and significantly save energy.
[0093] The present invention solves the problem of large lag and multiple working conditions through PID control with feedforward compensation and big data modeling. It has strong robustness and dynamic response capabilities, can quickly stabilize the temperature, and reduce manual dependence. It uses historical data and feedforward compensation to achieve precise temperature control, reduce lag and fluctuations. The intelligent control solution automatically adjusts, improves operating efficiency and saves energy. BRIEF DESCRIPTION OF THE DRAWINGS
[0094] Figure 1 It is a PID control flow chart based on feedforward compensation and applicable to large lag and multi-operating conditions;
[0095] Figure 2 A flowchart for dynamically adjusting the working condition labels according to different operating states and data of the system;
[0096] Figure 3 This is a schematic diagram of the result of fitting a temperature point with two straight lines;
[0097] Figure 4 To construct the recommended control quantity model and its weighted calculation Uw Flowchart of
[0098] Figure 5 This is the actual temperature control effect diagram. DETAILED DESCRIPTION
[0099] The following non-limiting embodiments can enable ordinary technicians in the field to understand the present invention more comprehensively, but do not limit the present invention in any way. It is necessary to point out that the following embodiments cannot be understood as limiting the scope of protection of the present invention. If technical personnel skilled in the art make some non-essential improvements and adjustments to the present invention based on the above-mentioned content of the present invention, they still fall within the scope of protection of the present invention.
[0100] The present invention first designs a system status marking method, determines the current working state by judging various system parameters and states, and adopts different compensation combined with PID to adjust the gas flow control strategy under different working conditions. Among them, a recommended control quantity model of gas flow is constructed to determine the feedforward compensation, and a two-segment straight line fitting method is used to calculate the rapid temperature rise and fall compensation and predict the future incremental compensation of the lag time endpoint, and finally calculate the output control quantity. Through the combination of these methods, the temperature control performance and energy utilization efficiency of the heating furnace are significantly improved, the system tends to the equilibrium point faster, the robustness of the control system under multiple working conditions is enhanced, and the problem of untimely control of traditional manual adjustment is avoided, ensuring that the heating furnace can achieve intelligent and efficient temperature control effects under complex and changeable working conditions.
[0101] Please combine Figures 1 to 5 The present invention provides a PID control method based on feedforward compensation and applicable to large lag and multiple working conditions, comprising:
[0102] Step 1: At each sampling cycle, the temperature sensor is used to measure the actual temperature measurement value of the outlet temperature of the heating medium in the heating furnace; the control deviation is calculated based on the actual temperature measurement value and the preset target temperature value; the PID current increment is calculated based on the control deviation and the PID parameters, and the PID parameters include proportional coefficient, integral coefficient and differential coefficient.
[0103] The output increment of the incremental PID control is based on the linear combination of the proportional term, integral term and differential term of the control deviation. The calculation process is briefly described as follows: The actual temperature measurement value at the kth moment is T(k), and the target temperature value is set as T set (k), the control deviation is e(k)=T set (k)-T(k);
[0104] PID current increment ΔU now The expression of (k) is as follows:
[0105] ΔU now (k) = K p[e(k)-e(k-1)]+K i e(k)+K d [e(k)-2e(k-1)+e(k-2)]
[0106] Among them, K p is the proportionality coefficient, K i is the integration coefficient, K d is the differential coefficient.
[0107] In the process of adjusting PID parameters, these parameters need to be set reasonably. In order to make PID parameters better adapt to the control of different heating furnaces, PID parameters can be calculated according to the operating parameters of different heating furnaces.
[0108] The three parameters K of PID p , K i and K d Use the following formula to calculate:
[0109]
[0110]
[0111] in:
[0112] Q max The maximum gas flow rate allowed for the heating furnace;
[0113] Q min The minimum gas flow rate allowed for the heating furnace;
[0114] T max The maximum temperature allowed by the heating furnace;
[0115] T min The lowest temperature allowed by the heating furnace;
[0116] t d It is the transfer lag time of the heating furnace system, that is, the time delay from the change of the input signal to the obvious change of the system output;
[0117] t r is the rise time of the heating furnace system, that is, the time period from when the output starts to rise to near the steady-state value;
[0118] V max The maximum heating rate allowed for the medium.
[0119] Step 2: Determine the current working state by analyzing the system operating status and historical data, and dynamically assign state labels to the control logic.
[0120] The production environment of oilfield stations is complex, with multiple production process switches, and due to cost factors, some stations have insufficient sensor hardware configuration. Therefore, the control system needs to timely identify the various parameters and states of the heating furnace production conditions and dynamically adjust the control strategy.
[0121] By analyzing the system operating status and historical data, the current working state is determined, and the label σ is dynamically assigned to the control logic so that the necessary correction compensation feedforward control method can be executed in advance under different working conditions, thereby reducing temperature fluctuations and hysteresis. The lag time is τ = t d +t r , at the kth moment, determine which category the system operating condition belongs to;
[0122] Initial heating stage: When the time when the heating furnace system starts to control the heating temperature is less than the system lag time τ, or when the time in the most recently saved data point is discontinuous, it means that the system is reconnected to the control after interruption of control, and the operating state label is σ(k) = 1;
[0123] Target temperature change stage: current set temperature T set (k) and the set temperature T at the previous moment set (k-1) is inconsistent, T set (k)≠T set (k-1), the operating state label is σ(k)=2;
[0124] There is medium flow data and the actual temperature gradually approaches the target temperature stage: the current medium flow is greater than 0, and the continuous time that the medium flow is greater than 0 is less than the system lag time τ, and the system meets one of the following conditions:
[0125] The current control deviation e(k)>0, and the current heating rate V(k)>0;
[0126] The current control deviation e(k) is less than 0, and the current heating rate V(k) is less than 0;
[0127] The operating state label is σ(k)=3;
[0128] There is medium flow data and the actual temperature tends to be stable: the current medium flow is greater than 0, and the continuous time of the medium flow greater than 0 is greater than or equal to the system lag time τ, and the operating state label is σ(k) = 4;
[0129] Process switching stage: There are many process switchings in oilfield stations. For example, due to cost factors, insufficient sensor hardware configuration in some stations and other limitations, when the heating furnace in some stations performs hot washing process, the medium will flow through the manifold equipped with flow sensors. When switching to the water mixing process, the medium will flow through the manifold not equipped with flow sensors. Therefore, when the hot washing process switches to the water mixing process, when the medium flow changes from greater than 0 to 0, the operating state label is σ(k) = 5;
[0130] When the temperature is near the target: when the control deviation ||e(k)||<δ, δ is the allowable deviation threshold, and the operating state label is σ(k)=0;
[0131] Exceeding the lag time stage: When the most recent operating condition labels σ are all 1 or 2, and the time length exceeds the lag time τ, the operating condition state label is σ(k) = 0;
[0132] No recommended control amount stage: If the recommended control amount model of the gas flow has no result at the target temperature or the recommended control amount is 0, the operating state label is σ(k) = 0;
[0133] Continuation phase: If any of the above conditions are not met, the operating state label is σ(k) = σ(k-1).
[0134] Step three, using historical operating data, calculate and analyze the appropriate recommended control quantity of the gas flow of the heating furnace under different temperature targets according to different operating conditions of the system; use the recommended control quantity model to feedforward compensate the control quantity and adjust the control quantity in time.
[0135] When the actual temperature approaches or reaches the target temperature, the control amount needs to maintain an appropriate value to keep the actual temperature at the target temperature, thereby avoiding temperature oscillation for too long. The historical operation data can be used to calculate and analyze the appropriate recommended control amount U of the gas flow of the heating furnace under different temperature targets according to different operating conditions of the system. w , which is the control value maintaining the target temperature.
[0136] When the medium flow rate changes suddenly, there is a large lag in the feedback of the actual temperature. In order to respond in advance and reduce the system lag, the recommended control quantity model can be used to feedforward compensate the control quantity and adjust the control quantity in time to reduce the lag problem of the PID control algorithm and reduce temperature fluctuations.
[0137] The construction process of the recommended control quantity model for calculating the gas flow corresponding to different target temperatures is as follows:
[0138] First determine the variables that have a significant impact on the medium temperature, which may include gas flow, medium output temperature at the upstream station, medium inlet temperature at the downstream station, medium flow, medium height position in the boiler, etc. The first important variables are gas flow and medium flow.
[0139] Find out the actual temperature timing {T k |k=1,2,L,n}, which is a relatively stable segment.
[0140] Get the actual temperature-medium flow-gas flow historical data set P0={(T k ,X k ,Y k )|k=1,2,L,n}, where T k is the actual temperature corresponding to the kth moment, X k is the medium flow rate corresponding to the kth moment, Y k is the gas flow corresponding to the kth moment.
[0141] Set the time window W, set the time window W equal to the control system lag time τ, and set the sliding step size S.
[0142] Calculate the data {(T k ,X k ,Y k )|k=i+1,i+2,L,i+W}, where i=mS, m=0,1,2,L, for Round down.
[0143] For the actual temperature series Perform straight line fitting y=αt+β, t∈[i+1,i+W], α, β are the parameters of the fitting line. Calculate the fitting straight line segment {(t,y)|y=αt+β,t∈[i+1,i+W]} and the target temperature straight line segment {(t,T set )|t∈[i+1,i+W]} is the area A i .
[0144] a) When the left end of the fitted straight line segment y| t=i+1 <T set And the right end y| t=i+W <T set , the area between them
[0145] b) When the left end of the fitted straight line segment y| t=i+1 >T set And the right end y| t=i+W >T set , the area between them
[0146] c) When y| t=i+1 ≤T set ≤y| t=i+W or y| t=i+1 ≥T set ≥y| t=i+W :
[0147] When y≡T set When i =0;
[0148] When the fitting straight line segment and the target temperature straight line segment intersect at a point t cross When i+1≤t cross ≤i+W.
[0149] The area between them
[0150] For the obtained area set {A i}, with the minimum enclosed area A min , the corresponding position i0 is
[0151]
[0152] Then in the actual temperature timing {T k |k=1,2,L,n}, with a time window W and a sliding step size S, the segment where the actual temperature is relatively stable is {T k |k=i0+1,i0+2,L,i0+W}. Similarly, the medium flow data set {X k |k=i0+1,i0+2,L,i0+W}, gas flow data set {Y k |k=i0+1,i0+2,L,i0+W}.
[0153] Calculate the average value of the variable in the time window W starting from i0. Actual temperature average value Average medium flow rate Average gas flow rate This gives the minimum area between In a relatively stable actual temperature average The average medium flow rate is When the recommended control amount of the corresponding gas flow is Generate Optimal Control Points
[0154] Based on the historical data accumulated every day, the recommended control quantity model of gas flow can be used to calculate the optimal control point set of gas flow corresponding to relatively stable actual temperature at different medium flow rates on different dates. and the area {A min,i |i=1,2,L,N}.
[0155] The selection is performed according to the priority order of factors such as the closest medium flow, the closest temperature, the smallest cumulative deviation, and the closest date. Based on the selected optimal control point set, a new weighted recommended control amount U is calculated. w , so that the weighted recommended control quantity U w Try to be as consistent as possible with the current working conditions so that the actual temperature can be maintained within a reasonable range of allowable deviation near the target temperature.
[0156] Weighted recommended control quantity U w The calculation process is as follows:
[0157] The optimal control point set calculated for each day is prioritized according to the order of closest medium flow, then closest temperature, then smallest cumulative deviation, and finally closest date. and the area {A min,i |i=1,2,L,N} for screening.
[0158] Filter by the following conditions one by one, first filter the medium flow The data with an error of 10% with the current medium flow rate is selected, followed by the stable temperature in the remaining data point set. The data with an error of 10% with the current target temperature are again screened for the area A in the remaining data point set. min,i Less than the lag time τ. If the remaining optimal control point data after satisfying the screening conditions is greater than 30, the 30 most recent optimal control point data are screened in the order of the most recent date.
[0159] a) If the number of optimal control point data after satisfying the screening conditions is greater than 1, it is recorded as and the corresponding sandwich area {A min,j |j=m1,m2,L,m N}, A min,j Maximum value A maxmin @max(A min,j ), minimum value A minmin @min(A min,j ), j = m1, m2, L, m N , and A maxmin ≠A minmin .
[0160] Then the gas flow after compensation is further calculated as Where K p is the proportional coefficient of PID, T set is the target temperature.
[0161] {A min,j |j=m1,m2,L,m N} is the weight linear transformation, which converts the weight into an exponentially decaying weight value, A min,j The larger the weight w is, the j The smaller.
[0162]
[0163] Weighted recommended control amount
[0164] b) In other cases, the weighted recommended control amount U w =0.
[0165] The historical operation data is accumulated as the number of operation days increases. When a new day has a new optimal control point When joining the set, the weighted recommended control amount U needs to be updated w .
[0166] Step 4: Based on the current system status, control deviation and historical data, the rapid temperature rise and fall compensation amount is dynamically adjusted through piecewise linear fitting technology to compensate for the control amount.
[0167] The present invention determines the optimal segmentation point by fitting two segments of straight lines. Obtaining the data point set {(t i ,y i )|i=1,2,L,n}, where t i is the i-th time, y i is the variable value corresponding to the i-th time. Let the corresponding position of the segmentation point be s, and divide the data point set {(t i ,y i )|i=1,2,L,n} is divided into {(t i ,y i )i|=1,L2,s and {(t i ,y i )|i=s+1,s+2,L,n}two parts, s=2,3,L,n-2.
[0168] Use the fitting line f1(t)=a1t+b1 to fit the data point set {(t i ,y i )|i=1,2,L,s} fitting, a1 and b1 are the parameters of the fitting line f1(t), and the sum of square errors of the fitting line is
[0169] Similarly, the fitting line f2(t)=a2t+b2 is used to fit the data point set {(t i ,y i)|i=s+1,s+2,L,n} fitting, a2 and b2 are the parameters of the fitting line f2(t), and the sum of square errors of the fitting line is
[0170] The coefficient of determination of the index used to measure the degree of fit
[0171]
[0172] in R 2 The value of (s) is between 0 and 1. The larger the value, the better the fit. 2 (s) maximum value is used to determine the optimal segmentation point. The corresponding position of the optimal segmentation point is The optimal segmentation point is like Figure 3 As shown, two straight lines are used to fit the data of 100 temperature points, and the determination coefficient R 2 The maximum value is 0.98174. After determining the optimal segmentation point, the expression of the front segment fitting straight line function is:
[0173] f1(t)=70.0608275141243+0.06144161155876632·t;
[0174] The expression of the latter fitting straight line function is:
[0175] f2(t)=73.80237833623693 -0.0026260104529616333·t.
[0176] The production environment is complex and there are multiple production process switches. The state of the heating furnace is changeable and often subject to multiple interferences. In order to reduce the lag of system control, a rapid temperature rise and fall compensation is proposed. The calculation of the rapid temperature rise and fall compensation is based on the current system state, control deviation and historical data. Through the piecewise linear fitting technology, the rapid temperature rise and fall compensation is dynamically adjusted to compensate for the control amount.
[0177] Generally, the target temperature of hot washing in oil fields is around 70℃, and the reasonable allowable error threshold is set to δ=2. During the production process, when the absolute value of the control deviation ||e||>δ, the control amount will be temporarily added with the rapid temperature rise compensation amount ΔU quick-up Or rapid cooling compensation ΔU quick-down ;
[0178] Check whether the time length from the start of control to the current data is less than the lag time τ; if so, perform linear fitting, and α and β are the slope and intercept of the fitting line respectively; if not, perform linear fitting in two sections, and after calculating and finding the optimal segmentation point, α and β are the slope and intercept of the second fitting line respectively;
[0179] Using the slope α and intercept β of the fitting line, predict the predicted temperature at the current time k after a lag time k+τ
[0180] Calculating the prediction bias
[0181] When the control deviation e>δ, the rapid temperature rise compensation ΔU quick-up =K p max(e,e p );
[0182] When the control deviation e<-δ, the rapid cooling compensation ΔU quick-down =K p ·min(e,e p );
[0183] In other cases, ΔU quick-up =ΔU quick-down =0;
[0184] In order to ensure that the rapid temperature rise and fall compensation amount meets the safety and rationality of the upper and lower limits of the heating furnace, the compensation amount is limited in range:
[0185] If ΔU quick-up >Q max -Q min , reset to Q max -Q min ;
[0186] If ΔU quick-up <0, reset to 0;
[0187] If ΔU quick-down <-(Q max -Q min ), reset to -(Q max -Q min );
[0188] If ΔU quick-down >0, reset to 0.
[0189] Step 5: At each lag time interval, linear fitting is performed on the current system state and historical data to predict future errors, and the future incremental compensation of the PID controller is adjusted accordingly.
[0190] In a large lag system, in order to reduce the lag, at each lag time interval, a linear fit is performed on the current system state and historical data to predict the future error, and the future incremental compensation ΔU of the PID controller is adjusted accordingly. future , in order to optimize the control of gas flow. The following is a detailed description of the method:
[0191] a) If the current time k is the end point of the lag time (k mod τ = 0), the following steps are performed to calculate the future incremental compensation ΔU future :
[0192] Whether the time length from the start of control to the current data is less than the lag time τ: If so, a straight line fitting is performed, and α and β are the slope and intercept of the fitting line respectively; if not, a two-segment linear fitting is performed, and after calculating and finding the optimal segmentation point, α and β are the slope and intercept of the second segment of the fitting line respectively.
[0193] Using the slope α and intercept β of the fitted line, we can predict the current moment k after half the lag time. Predicted temperature
[0194] Calculating the prediction bias
[0195] Future incremental compensation ΔU future =K p ·e p ;
[0196] b) At other times (k mod τ≠0), ΔU future =0.
[0197] Step 6: Combine the system status tags and historical data to calculate and summarize the output of each increment to optimize the gas flow control of the system.
[0198] Combined with the system's state tag σ and historical data, the output of each increment is calculated and summarized to optimize the system's gas flow control. The following is a detailed description of this method:
[0199] a) When σ∈{1,2,3,4}, and the weighted recommended control quantity U w (k)≠0, then judge and calculate in sequence:
[0200] If σ=1 and ||e||<δ,
[0201] U′(k)=U′(k-1)+ΔU now (k)+ΔU future (k)
[0202] U(k)=U′(k)+ΔU quick-up (k)+ΔU quick-down (k);
[0203] If e(k)>V max ·τ and V(k)<V max ,
[0204] U(k)=Qmax , Q max is the maximum gas flow rate;
[0205] If e(k)<-V max ·τ and V(k)>0,
[0206] U(k)=Q min , Q min is the minimum gas flow rate;
[0207] if And V(k)>0,
[0208] U(k)=U w (k)+K p e(k);
[0209] if And V(k)>0,
[0210] U(k)=U w (k);
[0211] In other cases,
[0212] U′(k)=U w (k)+ΣΔU now (k)+∑ΔU future (k)
[0213] U(k)=U′(k)+ΔU quick-up (k)+ΔU quick-down (k);
[0214] b) When or U w (k)=0, then
[0215] U′(k)=U′(k-1)+ΔU now (k)+ΔU future (k)
[0216] U(k)=U′(k)+ΔU quick-up (k)+ΔU quick-down (k).
[0217] Limit U(k) to the minimum gas flow Q min and maximum gas flow Q max between:
[0218] If U(k)<Q min , set U(k) = Q min ;
[0219] If U(k)>Q max , set U(k) = Qmax .
[0220] like Figure 5 As shown, during the period from 6:13 to 13:20, the hot wash process was carried out, and the medium passed through the hot wash manifold equipped with a flow sensor, so there was a record of the medium flow data; while in other time periods, the water addition process was carried out, and the medium passed through the water addition manifold that was not equipped with a flow sensor, so there was no record of the medium flow data. Therefore, the heating furnace needs to identify the various parameters and states of the system in a timely manner according to changes in production conditions, and dynamically adjust the control strategy. At 10:48, the medium flow rate suddenly increased, and the output control amount was adjusted by feedforward compensation increment, so that the actual temperature was stable at the target temperature of 73±0.6℃ for a long time. At around 15:00, the temperature dropped suddenly due to unknown factors. By timely identifying the operating conditions and quickly compensating the increment, the actual temperature can quickly converge to the target temperature, improving the control performance of the system.
[0221] The present invention proposes a PID control method based on feedforward compensation suitable for large lag and multiple working conditions. The method can identify and adapt to changes in different production conditions and adjust the control strategy in time. It is particularly suitable for complex and changeable production environments and can achieve precise control of temperature.
[0222] Big data modeling technology: The present invention utilizes big data modeling technology to determine the impact of each key variable on temperature through historical data analysis and modeling, and constructs a recommended control quantity model, which can predict and compensate for the lag of the system, analyze historical data and real-time data, and construct control models suitable for different working conditions, thereby improving the accuracy and stability of temperature control, so that the system can achieve stable control effects under different working conditions.
[0223] Control algorithm and modeling process: The control algorithm of the present invention combines feedforward compensation and PID control, which can quickly adjust the output when the temperature is disturbed and the deviation is large, reducing the hysteresis and temperature fluctuation of the system.
[0224] Intelligent control scheme: The present invention provides an intelligent control scheme that can automatically adjust the control compensation amount, reduce human intervention, and improve the system's autonomous adjustment ability. This scheme can achieve precise temperature control of the heating furnace, improve operating efficiency and save energy.
[0225] The present invention combines feedforward compensation, PID control suitable for large lag and multiple working conditions, and big data modeling to form an intelligent temperature control solution suitable for complex scenarios where heating furnaces require precise temperature control. This technology not only improves operating efficiency, but also significantly saves energy, providing an advanced solution for temperature control.
[0226] The above-described embodiments of the present invention do not limit the protection scope of the present invention.
Claims
1. A PID control method based on feedforward compensation suitable for large lag and multiple working conditions, characterized in that: include: Step 1: At each sampling period, the actual temperature measurement value of the outlet temperature of the heating medium in the heating furnace is measured by a temperature sensor; Calculate the control deviation according to the actual temperature measurement value and the preset target temperature value; calculate the PID current increment according to the control deviation and the PID parameters, wherein the PID parameters include a proportional coefficient, an integral coefficient and a differential coefficient; Step 2: By analyzing the system operating status and historical data, the current working status is determined and the status label is dynamically assigned to the control logic; Step 3: Using historical operation data, calculate and analyze the appropriate recommended control quantity of the gas flow of the heating furnace under different temperature targets according to different operating conditions of the system; use the recommended control quantity model to feedforward compensate the control quantity and adjust the control quantity in time; Step 4: Based on the current system state, control deviation and historical data, the rapid temperature rise and fall compensation amount is dynamically adjusted through piecewise linear fitting technology to compensate the control amount; Step 5: At each lag time interval, linear fitting is performed on the current system state and historical data to predict future errors, and the future incremental compensation of the PID controller is adjusted accordingly; Step 6: Combine the system status tags and historical data to calculate and summarize the output of each increment to optimize the gas flow control of the system.
2. The PID control method based on feedforward compensation and applicable to large lag and multiple working conditions as claimed in claim 1, characterized in that: In step 1, the actual temperature measurement value at the kth moment is recorded as T(k), and the target temperature value is set as T set (k), the control deviation is e(k)=T set (k)-T(k); PID current increment ΔU now The expression of (k) is as follows: ΔU now (k)=K p [e(k)-e(k-1)]+K i e(k)+K d [e(k)-2e(k-1)+e(k-2)] Among them, K p is the proportionality coefficient, K i is the integration coefficient, K d is the differential coefficient; The three parameters K of PID p , K i and K d Use the following formula to calculate: in: Q max The maximum gas flow rate allowed for the heating furnace; Q min The minimum gas flow rate allowed for the heating furnace; T max The maximum temperature allowed by the heating furnace; T min The lowest temperature allowed by the heating furnace; t d is the transfer lag time of the heating furnace system; t r is the rise time of the heating furnace system; V max The maximum heating rate allowed for the medium.
3. The PID control method based on feedforward compensation and applicable to large lag and multiple working conditions as claimed in claim 1, characterized in that: In step 2, the lag time is τ = t d +t r , at the kth moment, determine which category the system operating condition belongs to; Initial heating stage: When the time when the heating furnace system starts to control the heating temperature is less than the system lag time τ, or when the time in the most recently saved data point is discontinuous, it means that the system is reconnected to the control after interruption of control, and the operating state label is σ(k) = 1; Target temperature change stage: current set temperature T set (k) and the set temperature T at the previous moment set (k-1) is inconsistent, T set (k)≠T set (k-1), the operating state label is σ(k)=2; There is medium flow data and the actual temperature gradually approaches the target temperature stage: the current medium flow is greater than 0, and the continuous time that the medium flow is greater than 0 is less than the system lag time τ, and the system meets one of the following conditions: The current control deviation e(k)>0, and the current heating rate V(k)>0; The current control deviation e(k) is less than 0, and the current heating rate V(k) is less than 0; The operating state label is σ(k)=3; There is medium flow data and the actual temperature tends to be stable: the current medium flow is greater than 0, and the continuous time of the medium flow greater than 0 is greater than or equal to the system lag time τ, and the operating state label is σ(k) = 4; Process switching stage: when the hot washing process switches to the water mixing process, when the medium flow rate changes from greater than 0 to 0, the operating state label is σ(k) = 5; When the temperature is near the target: when the control deviation ||e(k)||<δ, δ is the allowable deviation threshold, and the operating state label is σ(k)=0; Exceeding the lag time stage: When the most recent operating condition labels σ are all 1 or 2, and the time length exceeds the lag time τ, the operating condition state label is σ(k) = 0; No recommended control amount stage: If the recommended control amount model of the gas flow has no result at the target temperature or the recommended control amount is 0, the operating state label is σ(k) = 0; Continuation phase: If any of the above conditions are not met, the operating state label is σ(k) = σ(k-1).
4. The PID control method based on feedforward compensation and applicable to large lag and multiple working conditions as claimed in claim 1, characterized in that: In step 3, the construction process of the recommended control quantity model is as follows: Obtain actual temperature-medium flow-gas flow historical data set; Set the time window W, set the time window W equal to the control system lag time τ, and set the sliding step size S; Perform sliding window calculation on the temperature time series to find relatively stable segments; Perform a straight line fit on the temperature series in each window and calculate the phase-intersection area A; Select the window segment corresponding to the minimum phase-intersection area, and calculate the average value of the time series in the window; Generate optimal control points; Further screen the best control point set that meets the current conditions; Calculate the weighted recommended control amount.
5. The PID control method based on feedforward compensation and applicable to large lag and multiple working conditions as claimed in claim 1, characterized in that: In step 4, the allowable error threshold is δ=2. During the production process, when the absolute value of the control deviation ||e||>δ, the control amount will be temporarily added with the rapid temperature rise compensation ΔU quick-up Or rapid cooling compensation ΔU quick-down ; Check whether the time length from the start of control to the current data is less than the lag time τ; if so, perform linear fitting, and α and β are the slope and intercept of the fitting line respectively; if not, perform linear fitting in two sections, and after calculating and finding the optimal segmentation point, α and β are the slope and intercept of the second fitting line respectively; Using the slope α and intercept β of the fitting line, predict the predicted temperature at the current time k after a lag time k+τ Calculating the prediction bias When the control deviation e>δ, the rapid temperature rise compensation ΔU quick-up =K p max(e,e p ); When the control deviation e<-δ, the rapid cooling compensation ΔU quick-down =K p ·min(e,e p ); In other cases, ΔU quick-up =ΔU quick-down =0; In order to ensure that the rapid temperature rise and fall compensation amount meets the safety and rationality of the upper and lower limits of the heating furnace, the compensation amount is limited in range: If ΔU quick-up >Q max -Q min , reset to Q max -Q min ; If ΔU quick-up <0, reset to 0; If ΔU quick-down <-(Q max -Q min ), reset to -(Q max -Q min ); If ΔU quick-down >0, reset to 0.
6. The PID control method based on feedforward compensation and applicable to large lag and multiple working conditions as claimed in claim 1, characterized in that: In step 5, if the current time k is the end point of the lag time, the following steps are performed to calculate the future incremental compensation ΔU future : Check whether the time length from the start of control to the current data is less than the lag time τ; if so, perform linear fitting, and α and β are the slope and intercept of the fitting line respectively; if not, perform linear fitting in two sections, and after calculating and finding the optimal segmentation point, α and β are the slope and intercept of the second fitting line respectively; Using the slope α and intercept β of the fitted line, we can predict the current moment k after half the lag time. Predicted temperature Calculating the prediction bias Future incremental compensation ΔU future =K p ·e p ; At other times (k modτ≠0), ΔU future =0.
7. The PID control method based on feedforward compensation and applicable to large lag and multiple working conditions as claimed in claim 1, characterized in that: In step 6, when σ∈{1,2,3,4}, and the weighted recommended control quantity U w (k)≠0, then judge and calculate in sequence: If σ=1 and ||e||<δ, U′(k)=U′(k-1)+ΔU now (k)+ΔU future (k), U(k)=U′(k)+ΔU quick-up (k)+ΔU quick-down (k); If e(k)>V max ·τ and V(k)<V max , U(k)=Q max , Q max is the maximum gas flow rate; If e(k)<-V max ·τ and V(k)>0, U(k)=Q min , Q min is the minimum gas flow rate; if And V(k)>0, U(k)=U w (k)+K p ·e(k); if And V(k)>0, U(k)=U w (k); In other cases, U′(k)=U w (k)+∑ΔU now (k)+∑ΔU future (k), U(k)=U′(k)+ΔU quick-up (k)+ΔU quick-down (k); when or U w (k)=0, then U′(k)=U′(k-1)+ΔU now (k)+ΔU future (k), U(k)=U′(k)+ΔU quick-up (k)+ΔU quick-down (k); Limit U(k) to the minimum gas flow Q min and maximum gas flow Q max between: If U(k)<Q min , set U(k) = Q min ; If U(k)>Q max , set U(k) = Q max .
Citation Information
Cited By
Cooperative control method for intelligent turbine controller
CN119179291A
Feed-forward control compensation method based on PID type adaptive iterative learning rate
CN119644709A
Transaction request processing method and device, storage medium and electronic equipment
CN120416334A
Quick and stable control method and device for cold box
CN121185025A
Piano robot playing feed-forward compensation double-loop control system and method based on PID
CN121340296A
