PID parameter optimization method and system of PID control system
By collecting and analyzing closed-loop control data, the method of optimizing PID parameters solves the problem that the PID control system cannot be continuously optimized in the existing technology, improves the control effect and stability, and is suitable for actual production environments that do not meet the step test conditions.
Patent Information
- Application Number
- CN202411805125.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-10
- Publication Date
- 2025-01-07
- Estimated Expiration
- 2044-12-10
AI Technical Summary
The parameter optimization methods of the existing PID control system cannot be continuously optimized and the control effect is poor. Especially in actual production processes that do not meet the step test conditions, the current control information cannot be fully utilized, and the accuracy of closed-loop PID parameter optimization is defective.
By collecting closed-loop control data, filtering and polynomial fitting PV and MV curves, removing abnormal peaks and troughs, analyzing characteristic information to evaluate the control effect of PID parameters, calculating convergence factors and overshoot factors, optimizing proportionality and integral time, and achieving continuous optimization .
The continuous optimization of PID control effect is achieved, the control effect and stability is improved, the optimization threshold is lowered, and the impact on the on-site production process is avoided.
Smart Images

Figure CN119270628A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of PID control, and in particular to a method and system for optimizing PID parameters of a PID control system. Background Art
[0002] For PID control systems, the existing PID parameter optimization method is mainly implemented through the internal model method, which uses step tests to obtain the dynamic response of the loop to achieve PID parameter optimization. In addition, this optimization method relies on model identification. Due to the characteristics and defects of existing identification methods, the accuracy of this method in open-loop identification is often higher than that in closed-loop identification, and it relies on step signals.
[0003] However, in the actual production process, considering the stability of production, most loops do not have the conditions for step testing, and the existing optimization methods are limited. In addition, the PID parameters obtained by the existing PID optimization methods are often unrelated to the current control state, and the control information under the current PID parameters cannot be fully utilized, and continuous optimization cannot be achieved. At the same time, a small number of existing closed-loop PID parameter optimization methods rely on fixed strategies for qualitative analysis and optimization, and their accuracy is defective. Summary of the invention
[0004] 1. Technical issues to be resolved In view of the above-mentioned shortcomings and deficiencies of the prior art, the present invention provides a method and system for optimizing PID parameters of a PID control system, which solves the technical problems existing in the prior art of being unable to continuously optimize and having poor control effect.
[0005] (II) Technical solution In order to achieve the above object, the main technical solutions adopted by the present invention include: In a first aspect, an embodiment of the present invention provides a method for optimizing PID parameters of a PID control system, the method comprising: collecting closed-loop control data of a current feedback control loop; wherein the closed-loop control data comprises a PV curve and an MV curve; filtering the PV curve and the MV curve respectively to obtain a filtered PV curve and a filtered MV curve, and performing polynomial fitting on the filtered PV curve and the filtered MV curve respectively to obtain a first fitting curve corresponding to the filtered PV curve and a second fitting curve corresponding to the filtered MV curve; preprocessing the first fitting curve and the second fitting curve respectively to remove abnormal peaks and troughs in the first fitting curve and abnormal peaks and troughs in the second fitting curve to obtain a first fitting curve after the abnormal peaks and troughs are removed and a second fitting curve after the abnormal peaks and troughs are removed; analyzing the first fitting curve after the abnormal peaks and troughs are removed and the second fitting curve after the abnormal peaks and troughs are removed to obtain characteristic information for evaluating the control effect of the PID parameters; evaluating the control effect of the PID parameters based on the characteristic information to obtain evaluation parameters of the control effect of the PID parameters; wherein the evaluation parameters comprise a convergence factor and an overshoot factor; optimizing the proportionality and integral time in the PID parameters based on the convergence factor and the overshoot factor.
[0006] In one possible embodiment, the closed-loop control data further includes an SV curve; the characteristic information includes but is not limited to the absolute phase difference between the first fitting curve after the abnormal peaks and troughs are removed and the second fitting curve after the abnormal peaks and troughs are removed, the change time of the filtered PV curve from the change moment of the SV curve to the change value of the SV curve when the SV curve changes, the maximum overshoot when the SV curve changes, the average oscillation period when the SV curve does not change, and the oscillation amplitude when the SV curve does not change.
[0007] In a possible embodiment, when there is a change in the SV curve, the control effect of the PID parameters is evaluated based on the characteristic information to obtain an evaluation parameter of the control effect of the PID parameters, including: comparing the maximum overshoot and the allowable control deviation corresponding to the current feedback control loop; if the maximum overshoot is less than or equal to the allowable control deviation corresponding to the current feedback control loop and the maximum overshoot is not equal to 0, then calculating the time ratio of the adjustment time and the change time corresponding to the current feedback control loop, and based on the target ratio range in which the time ratio is located, determining the convergence factor to be the convergence factor corresponding to the target ratio range; if the maximum overshoot is greater than the allowable control deviation corresponding to the current feedback control loop, obtaining the PV maximum adjustment value of the filtered PV curve, and calculating a first ratio of the PV maximum adjustment value to the SV adjustment value, and substituting the first ratio into the formula of the overshoot factor overshoot=a-0.5 to obtain the overshoot factor; wherein a represents the first ratio.
[0008] In a possible embodiment, when there is a change in the SV curve, the control effect of the PID parameters is evaluated based on the characteristic information to obtain the evaluation parameters of the control effect of the PID parameters, further including: if the maximum overshoot is equal to 0, then obtaining the PV adjustment value in the filtered PV curve that is closest to the SV adjustment value in the SV curve, and calculating the second ratio between the SV adjustment value and the PV adjustment value, then substituting the second ratio into the formula of overshoot factor overshoot=b*0.5 to obtain the overshoot factor; wherein b represents the second ratio.
[0009] In a possible embodiment, when there is no change in the SV curve, the control effect of the PID parameters is evaluated based on the characteristic information to obtain evaluation parameters of the control effect of the PID parameters, including: judging that all peak amplitudes and all trough amplitudes of the filtered PV curve are within a target range; wherein the target range is determined by the SV adjustment value in the SV curve and the allowable control deviation corresponding to the current feedback control loop; if it is determined that there is at least one peak amplitude or trough amplitude in the filtered PV curve that exceeds the target range and at the same time the average oscillation period is greater than the steady-state threshold corresponding to the current feedback control loop, then determining the range of the absolute phase difference, and based on the range of the absolute phase difference, determining the overshoot factor, and at the same time determining the convergence factor based on the absolute phase difference and the oscillation amplitude.
[0010] In a possible embodiment, the range of the absolute phase difference is determined, and based on the range of the absolute phase difference, the overshoot factor is 0.5 if the absolute phase difference is less than 18 degrees; if the absolute phase difference is within the range of 18-72 degrees, the absolute phase difference is substituted into the formula of overshoot factor overshoot=(c-18) / 108+0.5 to obtain the overshoot factor; wherein c represents the absolute phase difference; if the absolute phase difference c exceeds 72 degrees, the overshoot factor is 1.
[0011] In a possible embodiment, the convergence factor is determined based on the absolute phase difference and the oscillation amplitude, including: if the absolute phase difference is between 30 and 90 degrees, the absolute phase difference is substituted into the formula of the convergence factor convergencespeed=(90-c) / 120 to obtain the convergence factor; wherein c represents the absolute phase difference; if the absolute phase difference is less than 30 degrees, a third ratio of the oscillation amplitude vmean to 2*error is calculated, and it is determined whether the third ratio is greater than 2; if the third ratio is less than or equal to 2, the third ratio is substituted into the convergence factor convergencespeed= f / 2, we get the convergence factor; where, f is the third ratio; if the third ratio is greater than 2, the convergence factor is 1.
[0012] In a possible embodiment, when the SV curve changes, the proportionality and integral time in the PID parameters are optimized based on the convergence factor and the overshoot factor, including: If the overshoot factor is less than 0.5 and the convergence factor is less than 0.5, the optimized proportionality PB new and the optimized integration time Ti new The calculation formula is as follows: ; ; In the formula, PB old is the proportionality before optimization; overshoot is the overshoot factor; convergencespeed is the convergence factor; Ti old is the integration time before optimization; Alternatively, if the overshoot factor is greater than or equal to 0.5 and the convergence factor is less than 0.5, the optimized proportionality PB new and the optimized integration time Ti new The calculation formula is as follows: ; ; Alternatively, if the overshoot factor is less than 0.5 and the convergence factor is greater than 0.5, the optimized proportionality PB new and the optimized integration time Ti new The calculation formula is as follows: ; ; Alternatively, if the overshoot factor is greater than or equal to 0.5 and the convergence factor is greater than or equal to 0.5, the optimized proportionality PB new and the optimized integration time Ti new The calculation formula is as follows: ; .
[0013] In a possible embodiment, when there is no change in the SV curve, the proportionality and integral time in the PID parameters are optimized based on the convergence factor and the overshoot factor, including: If the overshoot factor is less than 0.5 and the convergence factor is less than 0.5, the optimized proportionality PBnew and the optimized integration time Ti new The calculation formula is as follows: ; ; In the formula, PB old is the proportionality before optimization; overshoot is the overshoot factor; convergencespeed is the convergence factor; Ti old is the integration time before optimization; Alternatively, if the overshoot factor is greater than or equal to 0.5 and the convergence factor is less than 0.5, the optimized proportionality PB new and the optimized integration time Ti new The calculation formula is as follows: ; ; Alternatively, if the overshoot factor is less than 0.5 and the convergence factor is greater than 0.5, the optimized proportionality PB new and the optimized integration time Ti new The calculation formula is as follows: ; ; Alternatively, if the overshoot factor is greater than or equal to 0.5 and the convergence factor is greater than or equal to 0.5, the optimized proportionality PB new and the optimized integration time Ti new The calculation formula is as follows: ; .
[0014] In a second aspect, an embodiment of the present invention provides a PID control system, comprising a controller, wherein the controller is used to execute a method for optimizing PID parameters of a PID control system as described in any one of the first aspects.
[0015] (III) Beneficial effects The beneficial effects of the present invention are: The embodiment of the present application provides a method and system for optimizing PID parameters of a PID control system, which collects closed-loop control data of a current feedback control loop, and then filters a PV curve and a MV curve respectively to obtain a filtered PV curve and a filtered MV curve, and performs polynomial fitting on the filtered PV curve and the filtered MV curve respectively to obtain a first fitting curve corresponding to the filtered PV curve and a second fitting curve corresponding to the filtered MV curve, and then pre-processes the first fitting curve and the second fitting curve respectively to remove abnormal peaks and troughs in the first fitting curve and the abnormal peaks and troughs in the second fitting curve to obtain abnormal peaks and troughs. A first fitting curve after trough removal and a second fitting curve after abnormal peaks and troughs are removed, and then the first fitting curve after abnormal peaks and troughs are removed and the second fitting curve after abnormal peaks and troughs are removed are analyzed to obtain characteristic information for evaluating the control effect of PID parameters, and then the control effect of the PID parameters is evaluated based on the characteristic information to obtain evaluation parameters of the control effect of the PID parameters, wherein the evaluation parameters include convergence factor and overshoot factor, and then the proportionality and integral time in the PID parameters are optimized based on the convergence factor and the overshoot factor. Compared with the existing scheme, it can not only achieve continuous optimization, but also improve the PID control effect.
[0016] In order to make the above-mentioned objectives, features and advantages to be achieved by the embodiments of the present application more obvious and understandable, the following specifically cites preferred embodiments and describes them in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments of the present application will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0018] Figure 1 A flow chart of a method for optimizing PID parameters of a PID control system provided in an embodiment of the present application is shown; Figure 2 A schematic diagram of a PID control system provided in an embodiment of the present application is shown. DETAILED DESCRIPTION
[0019] In order to better explain the present invention and facilitate understanding, the present invention is described in detail below through specific implementation modes in conjunction with the accompanying drawings.
[0020] In order to solve the problem of poor control effect and stability of PID control loops in the prior art, an embodiment of the present application provides a method and system for optimizing PID parameters of a PID control system, which evaluates the PID control effect with the help of relevant information such as loop type characteristics and control trends under current PID parameter control, and completes PID parameter optimization based on the evaluation results. Since the PID parameter optimization method is based on existing PID parameters, the method can support continuous iterative optimization of closed-loop loops, gradually improve the PID control effect, and can also lower the threshold for PID parameter optimization and improve the control effect and stability of the PID control loop.
[0021] In order to better understand the above technical solution, exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present invention are shown in the accompanying drawings, it should be understood that the present invention can be implemented in various forms and should not be limited by the embodiments described herein. On the contrary, these embodiments are provided to enable a clearer and more thorough understanding of the present invention and to fully convey the scope of the present invention to those skilled in the art.
[0022] In order to facilitate understanding of the embodiments of the present application, some terms involved in the present application are first explained as follows: “PV”: measured value; “SV”: set value; "MV": valve position value; "Average time interval tmean": It represents the mean of the time between all adjacent peaks and troughs of the same curve.
[0023] It should be noted here that in the calculation process of the average time interval tmean, half-wave units are used (0 degrees and 180 degrees of trigonometric functions, not 360 degrees). This calculation method is relatively more accurate than the calculation method based on 360 degrees. Of course, calculation based on 360 degrees is also possible; "Average amplitude vmean": It represents the mean of the amplitudes between all peaks and troughs of the same curve; "Time interval t1": it represents the time interval between the current adjacent peaks and troughs of the same curve; "Amplitude v1": It represents the amplitude between the current adjacent peaks and troughs of the same curve; “Waveform error time tmin”: For different types of feedback control loops, the waveform error time tmin is different, please refer to Table 1 mentioned later; “Change time tup”: It indicates the time it takes for PV to reach the change value of the SV curve from the change moment of the SV curve when the SV curve changes; "Maximum overshoot overmax": It indicates the maximum overshoot of PV when the SV curve changes; “Allowable control deviation error”: For different types of feedback control loops, the allowable control deviation error is different. For details, please refer to Table 1 mentioned later; "Adjust time adjusttime": For different types of feedback control loops, the adjustment time adjusttime is different, please refer to Table 1 mentioned later for details; "Steady-state threshold stabletime": For different types of feedback control loops, the steady-state threshold stabletime is different, please refer to Table 1 mentioned later for details; "Convergence speed": It is used to evaluate the current control effect and is used for PID parameter optimization; "Overshoot factor": It is used to evaluate the current control effect and is used for PID parameter optimization; “PB”: proportionality; “TI”: integration time.
[0024] First embodiment
[0025] See also Figure 1 , Figure 1 FIG. 1 is a flow chart showing a method for optimizing PID parameters of a PID control system provided by an embodiment of the present application. Figure 1 As shown, the optimization method can be executed by an electronic device, and the specific device of the electronic device can be set according to actual needs, and the embodiments of the present application are not limited thereto. For example, the electronic device can be a computer or a server. Specifically, the optimization method includes: Step S110, collecting closed-loop control data of the current feedback control loop, wherein the closed-loop control data includes a PV curve, a MV curve, and a SV curve.
[0026] It should be understood that the type of the current feedback control loop can be set according to actual needs, and the embodiments of the present application are not limited thereto.
[0027] For example, the type of the current feedback control loop may be a flow loop, a pressure loop, a liquid level loop, a temperature loop, or other loops.
[0028] Step S120, filtering the PV curve and the MV curve respectively to obtain a filtered PV curve and a filtered MV curve, and performing polynomial fitting on the filtered PV curve and the filtered MV curve respectively to obtain a first fitting curve corresponding to the filtered PV curve and a second fitting curve corresponding to the filtered MV curve.
[0029] Specifically, in order to better find the characteristics of the control curve, the first-order mean filtering method can be used to filter the PV curve and the MV curve respectively to obtain the filtered PV curve and the filtered MV curve, and the filtered PV curve is subjected to polynomial fitting to obtain the first fitting curve, and the filtered MV curve is subjected to polynomial fitting to obtain the second fitting curve.
[0030] Step S130 , preprocessing the first fitting curve and the second fitting curve respectively to remove abnormal peaks and troughs in the first fitting curve and abnormal peaks and troughs in the second fitting curve, to obtain the first fitting curve after the abnormal peaks and troughs are removed and the second fitting curve after the abnormal peaks and troughs are removed.
[0031] Specifically, all peak and trough information in the first fitting curve is determined, and then the average time interval tmean and the average amplitude vmean of all peaks and troughs in the first fitting curve are calculated. Also, the time interval t1 and the amplitude v1 between the current adjacent peaks and troughs in the first fitting curve are calculated. and In the case of abnormal peaks and troughs, the current adjacent peaks and troughs are determined to be abnormal peaks and troughs, and the current adjacent peaks and troughs are removed.
[0032] In addition, if t1<tmin is satisfied, the current adjacent peaks and valleys are also determined to be abnormal peaks and valleys, and the current adjacent peaks and valleys are removed. Among them, different types of feedback control loops have different waveform error time tmin, which can be seen in Table 1 below.
[0033] Table 1: Circuit parameter selection table
[0034] As shown in Table 1, when the current feedback control loop is a flow loop, the waveform error time tmin is 1 minute; when the current feedback control loop is a pressure loop, a liquid level loop, or a temperature loop, the waveform error time tmin is 5 minutes; when the current feedback control loop is other loops, the waveform error time tmin is 3 minutes.
[0035] In addition, for the adjustment time adjusttime, steady-state threshold stabletime and allowable control deviation error in Table 1, they are similar to the waveform error time tmin, and the corresponding values can be selected according to the type of feedback control loop mentioned in Table 1, which will not be repeated here.
[0036] It should be noted that although multiple values are recorded in Table 1, those skilled in the art should understand that the values in Table 1 can be adjusted according to actual needs, and those skilled in the art are not limited thereto. For example, although Table 1 records that the waveform error time tmin corresponding to the flow loop is 1 minute, those skilled in the art can adjust it to 2 minutes, etc., according to actual needs.
[0037] It should be noted here that, in the preprocessing process of the first fitting curve, although the coefficient 1 / 4 is used as an example for description, those skilled in the art should understand that the coefficient can also be adjusted to other coefficients as long as the coefficient is greater than 0 and less than 0.5. The embodiments of the present application are not limited to this.
[0038] It should also be noted that the preprocessing process of the second fitting curve is similar to the preprocessing process of the first fitting curve, which will not be repeated here. For details, please refer to the relevant description of the first fitting curve.
[0039] Step S140 , analyzing the first fitting curve after the abnormal peaks and troughs are removed and the second fitting curve after the abnormal peaks and troughs are removed to obtain characteristic information for evaluating the control effect of PID parameters.
[0040] It should be understood that the specific information included in the feature information can be set according to actual needs, and the embodiments of the present application are not limited to this.
[0041] For example, the characteristic information includes but is not limited to the absolute phase difference between the first fitting curve after the abnormal peaks and troughs are removed and the second fitting curve after the abnormal peaks and troughs are removed, the change time of the filtered PV curve from the change moment of the SV curve to the change value of the SV curve when the SV curve changes, the maximum overshoot overmax when the SV curve changes, the average oscillation period when the SV curve does not change, and the oscillation amplitude when the SV curve does not change.
[0042] It should also be understood that the process of acquiring feature information can be set according to actual needs, and the embodiments of the present application are not limited to this.
[0043] Optionally, the process of acquiring the phase absolute difference between the first fitting curve after the abnormal peaks and troughs are removed and the second fitting curve after the abnormal peaks and troughs are removed is: The order of the peaks and troughs of the first fitting curve after the abnormal peaks and troughs are removed can be corresponded in sequence with the order of the peaks and troughs in the second fitting curve after the abnormal peaks and troughs are removed. At the same time, if there are peaks and troughs that cannot be corresponded, they can be deleted. For example, the first peak of the first fitting curve after the abnormal peaks and troughs are removed is corresponded to the first peak of the second fitting curve after the abnormal peaks and troughs are removed, and the first trough of the first fitting curve after the abnormal peaks and troughs are removed is corresponded to the first trough of the second fitting curve after the abnormal peaks and troughs are removed. Subsequently, the absolute phase difference between the first fitting curve after the abnormal peaks and troughs are removed and the second fitting curve after the abnormal peaks and troughs are removed can be calculated, and the value range of the absolute phase difference is 0~90°, that is, the absolute phase difference of the peaks and troughs corresponding to the first fitting curve after the abnormal peaks and troughs are removed and the second fitting curve after the abnormal peaks and troughs are removed according to the above correspondence method is calculated.
[0044] Optionally, the process of obtaining the change time tup of the filtered PV curve from the change moment of the SV curve to the change value of the SV curve and the maximum overshoot overmax when the SV curve changes is as follows: When the SV curve changes (ie, the SV curve is not a straight line), the number of changes of the SV curve can be determined.
[0045] Among them, when the SV curve changes once (that is, the SV curve includes two parallel straight lines, and there is a connecting line between the two straight lines), the change time tup of the filtered PV curve from the change moment of the SV curve (that is, the moment corresponding to the connection point of the first straight line of the two parallel straight lines and the connecting line) to the change value of the SV curve for the first time (that is, the moment corresponding to the connection point of the second straight line of the two parallel straight lines and the connecting line) can be calculated, and the maximum overshoot overmax can be calculated; When the SV curve changes multiple times, multiple change times tup for the filtered PV curve to reach the corresponding change value of the SV curve each time from each change moment of the SV curve can be calculated. For example, when the SV curve changes twice, the first change time tup for the filtered PV curve to reach the first change value of the SV curve from the first change moment of the SV curve can be calculated, and the second change time tup for the filtered PV curve to reach the second change value of the SV curve from the second change moment of the SV curve can also be calculated. Subsequently, the average value of the multiple change times tup can be calculated, and the average value is used as the final change time tup, and the maximum overshoot overmax is calculated.
[0046] It should be understood that the maximum overshoot overmax is the amount by which the adjustment exceeds the SV adjustment value. For example, when the SV is changed from 10 to 15, the PV starts to rise from 10 under the action of the controller, and after reaching 15, it may continue to rise to 16, and then fall back to around 15. At this time, the overshoot is 16-15=1. The same is true for downward adjustment. When the SV is changed from 10 to 5, the PV is as low as 4, and the overshoot is 1.
[0047] It should be noted here that, in principle, only the data segment where the SV changes once is analyzed (a segment of analysis data contains at most one SV change), but this method also supports the use in the case where the SV changes multiple times. In addition, when there are multiple changes, the maximum overshoot overmax can be calculated separately and then the average is taken (this involves the calculation of the overshoot factor overshoot, which must also be calculated separately and then the average is taken when calculating this factor). This will be explained later.
[0048] Optionally, the process of obtaining the average oscillation period when the SV curve does not change and the oscillation amplitude when the SV curve does not change is: When there is no change in the SV curve (that is, the SV curve is a straight line), the average oscillation period is 2*tmean and the oscillation amplitude is vmean.
[0049] It should be noted here that when calculating the average time interval tmean, in order to calculate more accurately, what is actually calculated is half of a wave, that is, the time interval from the peak to the trough of the PV wave (that is, the position of 0 degrees and 180 degrees of the trigonometric function, not 360 degrees). Therefore, a complete oscillation cycle requires multiplying this value by 2. In addition, if calculated according to 360 degrees, there is no need to multiply by 2.
[0050] Step 150: Evaluate the control effect of the PID parameters based on the characteristic information to obtain evaluation parameters of the control effect of the PID parameters, wherein the evaluation parameters include a convergence factor and an overshoot factor.
[0051] It should be understood that the specific process of evaluating the control effect of PID parameters based on characteristic information can be set according to actual needs, and the embodiments of the present application are not limited to this.
[0052] Optionally, when the SV curve changes, since different types of feedback control loops correspond to different allowable control deviation errors, the allowable control deviation error corresponding to the current feedback control loop can be determined by querying Table 1. In addition, the maximum overshoot overmax and the allowable control deviation error corresponding to the current feedback control loop can be compared.
[0053] Among them, if the maximum overshoot overmax is less than or equal to the allowable control deviation error corresponding to the current feedback control loop and the maximum overshoot overmax is not equal to 0, the time ratio of the adjustment time adjusttime and the change time tup corresponding to the current feedback control loop (i.e. adjusttime / tup) is calculated, and based on the target ratio range in which the time ratio lies, the convergence factor is determined to be the convergence factor corresponding to the target ratio range.
[0054] For example, when the maximum overshoot overmax is less than or equal to the allowable control deviation error corresponding to the current feedback control loop and the maximum overshoot overmax is not equal to 0, the time ratio t of the adjustment time adjusttime and the change time tup corresponding to the current feedback control loop is calculated. Subsequently, if it is determined that the time ratio t is within the range of 0.5-0.9, the convergence speed is too slow, and the convergence factor convergencespeed=(t-0.5)*1.25 at this time; if it is determined that the time ratio t is less than 0.5, the convergence factor convergencespeed is 0 at this time; if it is determined that the time ratio t is within the range of 1.1-1.5, the convergence factor convergencespeed=(t-1.1)*1.25+0.5 at this time; if it is determined that the time ratio t is greater than 1.5, the time ratio t is processed as 1.5 at this time, so that the convergence factor convergencespeed=(1.5-1.1)*1.25+0.5=1 at this time.
[0055] In addition, if the maximum overshoot overmax is equal to 0, that is, there is no overshoot, it means that the loop is under-adjusted and the adjustment speed is too slow. At this time, the PV adjustment value closest to the SV adjustment value in the SV curve in the filtered PV curve is obtained, and the second ratio b of the SV adjustment value and the PV adjustment value is calculated. The second ratio b must be between 0-1, and the overshoot factor overshoot=b*0.5. For example, assuming that the current PV and SV are both 10, then the SV is adjusted to 15, and then the PV rises slowly, and the highest rises to 13. At this time, the second ratio b here is (13-10) / (15-10)=0.6, and the overshoot factor overshoot=0.6*0.5=0.3.
[0056] It should be noted here that if the SV is adjusted multiple times, the overshoot factor overshoot when the SV is adjusted each time can be calculated according to the above method, and then the average value of the multiple overshoot factors overshoot can be calculated as the final overshoot factor overshoot.
[0057] Correspondingly, other situations are similar. Specifically, when SV is adjusted multiple times, In addition, when the maximum overshoot overmax is greater than the allowable control deviation error corresponding to the current feedback control loop, the loop has overshoot, the maximum PV adjustment value of the filtered PV curve is obtained, and the first ratio a of the maximum PV adjustment value and the SV adjustment value is calculated, then the overshoot factor overshoot=a-0.5. For example, when SV changes from 10 to 15, PV starts to rise from 10 under the action of the controller, and after reaching 15, it may continue to rise to 18, and then fall back to around 15. Therefore, the maximum PV adjustment value is 18, the first ratio a=1.2, and then the overshoot factor overshoot=1.2-0.5=0.7.
[0058] Optionally, when there is no change in the SV curve, it is determined that all peak amplitudes and all trough amplitudes of the filtered PV curve are within a target range of [SV adjustment value - allowable control deviation error, SV adjustment value + allowable control deviation error]. If there is at least one peak amplitude or at least one trough amplitude that exceeds the range of [SV adjustment value - allowable control deviation error, SV adjustment value + allowable control deviation error], the maximum overshoot overmax and the convergence speed convergence speed are determined by the oscillation conditions of PV and MV, specifically: If the filtered PV curve has a lag in response to the filtered MV curve, it is judged as overshoot, and the lag can be represented by the phase absolute difference c (in degrees). If the phase absolute difference c is less than 18 degrees, the overshoot factor overshoot=0.5, that is, there is no overshoot; if the phase absolute difference c is within the range of 18-72 degrees, the overshoot factor overshoot=(c-18) / 108+0.5; if the phase absolute difference c exceeds 72 degrees, the overshoot factor overshoot is equal to 1.
[0059] At the same time, in order to deal with lag, PID parameter optimization can also be performed synchronously by accelerating convergence. If the average oscillation period is greater than the steady-state threshold stabletime of the corresponding loop, see Table 1 for details. For loops with an absolute phase difference of 30-90 degrees, the convergence factor convergencespeed=(90-c) / 120. Also, for loops with an absolute phase difference of less than 30 degrees and at least one peak amplitude or at least one trough amplitude outside the range of [SV adjustment value-allowable control deviation error, SV adjustment value+allowable control deviation error], it is considered an oscillation caused by too fast convergence, and the third ratio of the oscillation amplitude vmean and 2*error can be calculated. f , convergence speed = the third ratio f / 2. At the same time, if the ratio f If the ratio is greater than 2, fAs 2, that is, in the ratio f When it is greater than 2, the convergence speed = 1.
[0060] Step S160: Optimize the proportionality and integral time in the PID parameters based on the convergence factor and the overshoot factor.
[0061] It should be noted that in step S150, in some cases both (i.e., convergence factor and overshoot factor) are calculated and evaluated, and in some cases only one of the indicators (i.e., convergence factor or overshoot factor) is calculated and evaluated. In the latter case, the other indicator not involved in the calculation and evaluation can be a default value of 0.5.
[0062] It should be understood that the specific process of optimizing the proportionality and integration time in the PID parameters based on the convergence factor and the overshoot factor can be set according to actual needs, and the embodiments of the present application are not limited to this.
[0063] Optionally, when there is a change in the SV curve, it can be divided into the following four cases: When the overshoot factor is less than 0.5 and the convergence speed factor is less than 0.5, the optimized proportionality PB new and the optimized integration time Ti new The calculation formula is as follows: ; ; In the formula, PB old is the proportionality before optimization; Ti old is the integration time before optimization.
[0064] And, when the overshoot factor overshoot is greater than or equal to 0.5 and the convergence speed factor convergence speed is less than 0.5, the optimized proportionality PB new and the optimized integration time Ti new The calculation formula is as follows: ; .
[0065] And, when the overshoot factor overshoot is less than 0.5 and the convergence speed factor convergence speed is greater than 0.5, the optimized proportionality PB newand the optimized integration time Ti new The calculation formula is as follows: ; .
[0066] And, when the overshoot factor overshoot is greater than or equal to 0.5 and the convergence speed factor convergence speed is greater than or equal to 0.5, the optimized proportionality PB new and the optimized integration time Ti new The calculation formula is as follows: ; .
[0067] Optionally, when there is no change in the SV curve, it can be divided into the following four cases: And, when the overshoot factor overshoot is less than 0.5 and the convergence speed factor convergence speed is less than 0.5, the optimized proportionality PB new and the optimized integration time Ti new The calculation formula is as follows: ; .
[0068] And, when the overshoot factor overshoot is greater than or equal to 0.5 and the convergence speed factor convergence speed is less than 0.5, the optimized proportionality PB new and the optimized integration time Ti new The calculation formula is as follows: ; .
[0069] And, when the overshoot factor overshoot is less than 0.5 and the convergence speed factor convergence speed is greater than 0.5, the optimized proportionality PB new and the optimized integration time Ti new The calculation formula is as follows: ; .
[0070] And, when the overshoot factor overshoot is greater than or equal to 0.5 and the convergence speed factor convergence speed is greater than or equal to 0.5, the optimized proportionality PB new and the optimized integration time Ti new The calculation formula is as follows: ; .
[0071] Therefore, with the help of the above technical solution, the optimization method of the PID parameters of the PID control system of the present application has the following specific advantages: Compared with the common internal model optimization method, the present invention does not rely on step information and will not affect the on-site production process; No need for modeling, no reliance on model accuracy, use data analysis methods to optimize PID, and make full use of information such as loop type characteristics and current PID parameters; The PID parameter optimization in the present invention is based on the optimization of the existing PID parameters and their control effects. The optimized PID parameters have a dependency relationship with the PID parameters before optimization, making full use of the information of the current state of the loop, and will not generate a new PID parameter out of thin air. In the optimization process, no significant PID parameter changes will occur, thus ensuring the safety of the optimization process. The optimization process of the present invention is divided into two parts, namely evaluation and optimization. The optimization process can be decoupled, and experienced users can add their own understanding between evaluation and optimization, which is convenient and flexible. In other words, the engineer's own understanding of the curve is used here instead of step S110 to step S150. The whole method is divided into two processes, evaluation and setting, and step S110 to step S150 are the evaluation process. The complete process of step S110 to step S160 can realize one-click operation, and complete the two things of evaluation and setting at the same time (the logic has a sequence, but it is a one-time operation for user experience). The evaluation of the curve shown in the result can also be used as a reference for engineers. Engineers can modify it and set it again, that is, the following steps can be added between step S150 and step S160: when the evaluation parameters are obtained, the evaluation parameters are displayed to the user through the interface; if the user's modification instruction is received, the evaluation parameters are modified accordingly; if the user's confirmation instruction is received, step S160 is executed.
[0072] It should be understood that the above-mentioned method for optimizing the PID parameters of the PID control system is merely exemplary, and those skilled in the art may make various modifications based on the above-mentioned method, and the modified schemes also fall within the protection scope of the present application.
[0073] Second embodiment
[0074] See also Figure 2 , It should be understood by those skilled in the art that embodiments of the present invention may be provided as methods, systems or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0075] It should be understood by those skilled in the art that embodiments of the present invention may be provided as methods, systems or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0076] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems) and computer program products according to embodiments of the present invention. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions.
[0077] It should be noted that the word "a" or "an" preceding a component does not exclude the presence of a plurality of such components. The invention may be implemented by means of hardware comprising a number of different components and by means of a suitably programmed computer. Among the several means listed, several of these means may be embodied by the same hardware. The use of the words first, second, third, etc., is for convenience of expression only and does not indicate any order. These words may be understood as part of the name of the component.
[0078] In addition, it should be noted that, in the description of this specification, the description of the terms "one embodiment", "some embodiments", "embodiment", "example", "specific example" or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, unless they are contradictory.
[0079] Although the preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments after knowing the basic creative concept. Therefore, the technical solution should be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the present invention.
[0080] Obviously, those skilled in the art can make various modifications and variations to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention belong to the scope of the technical solution of the present invention and its equivalent technology, the present invention should also include these modifications and variations.
Claims
1. A method for optimizing PID parameters of a PID control system, characterized in that: include: Collecting closed-loop control data of the current feedback control loop; wherein the closed-loop control data includes a PV curve and a MV curve; filtering the PV curve and the MV curve respectively to obtain a filtered PV curve and a filtered MV curve, and performing polynomial fitting on the filtered PV curve and the filtered MV curve respectively to obtain a first fitting curve corresponding to the filtered PV curve and a second fitting curve corresponding to the filtered MV curve; Preprocessing the first fitting curve and the second fitting curve respectively to remove abnormal peaks and troughs in the first fitting curve and abnormal peaks and troughs in the second fitting curve, to obtain a first fitting curve after the abnormal peaks and troughs are removed and a second fitting curve after the abnormal peaks and troughs are removed; Analyzing the first fitting curve after the abnormal peaks and troughs are removed and the second fitting curve after the abnormal peaks and troughs are removed to obtain characteristic information for evaluating the control effect of the PID parameters; Based on the characteristic information, the control effect of the PID parameter is evaluated to obtain evaluation parameters of the control effect of the PID parameter; wherein the evaluation parameters include a convergence factor and an overshoot factor; The proportionality and the integral time in the PID parameters are optimized based on the convergence factor and the overshoot factor.
2. The optimization method according to claim 1, characterized in that: The closed-loop control data further includes an SV curve; the characteristic information includes but is not limited to the absolute phase difference between the first fitting curve after the abnormal peaks and troughs are removed and the second fitting curve after the abnormal peaks and troughs are removed, the change time of the filtered PV curve from the change moment of the SV curve to the change value of the SV curve when the SV curve changes, the maximum overshoot when the SV curve changes, the average oscillation period when the SV curve does not change, and the oscillation amplitude when the SV curve does not change.
3. The optimization method according to claim 2, characterized in that: When the SV curve changes, the control effect of the PID parameter is evaluated based on the characteristic information to obtain an evaluation parameter of the control effect of the PID parameter, including: Comparing the maximum overshoot with the allowable control deviation corresponding to the current feedback control loop; If the maximum overshoot is less than or equal to the allowable control deviation corresponding to the current feedback control loop and the maximum overshoot is not equal to 0, then calculating the time ratio of the adjustment time and the change time corresponding to the current feedback control loop, and based on the target ratio range in which the time ratio is located, determining the convergence factor to be a convergence factor corresponding to the target ratio range; If the maximum overshoot is greater than the allowable control deviation corresponding to the current feedback control loop, the PV maximum adjustment value of the filtered PV curve is obtained, and a first ratio of the PV maximum adjustment value to the SV adjustment value is calculated, and the first ratio is substituted into the formula of overshoot factor overshoot=a-0.5 to obtain the overshoot factor; wherein a represents the first ratio.
4. The optimization method according to claim 3, characterized in that: When the SV curve changes, evaluating the control effect of the PID parameter based on the characteristic information to obtain an evaluation parameter of the control effect of the PID parameter further includes: If the maximum overshoot is equal to 0, the PV adjustment value in the filtered PV curve that is closest to the SV adjustment value in the SV curve is obtained, and a second ratio between the SV adjustment value and the PV adjustment value is calculated, and the second ratio is substituted into the formula of overshoot factor overshoot=b*0.5 to obtain the overshoot factor; wherein b represents the second ratio.
5. The optimization method according to claim 2, characterized in that: When the SV curve does not change, the control effect of the PID parameter is evaluated based on the characteristic information to obtain an evaluation parameter of the control effect of the PID parameter, including: Determining that all peak amplitudes and all trough amplitudes of the filtered PV curve are within a target range; wherein the target range is determined by the SV adjustment value in the SV curve and the allowable control deviation corresponding to the current feedback control loop; If it is determined that there is at least one peak amplitude or trough amplitude in the filtered PV curve that exceeds the target range and at the same time the average oscillation period is greater than the steady-state threshold corresponding to the current feedback control loop, the range of the absolute phase difference is determined, and based on the range of the absolute phase difference, the overshoot factor is determined, and at the same time, the convergence factor is determined based on the absolute phase difference and the oscillation amplitude.
6. The optimization method according to claim 5, characterized in that: The determining the range of the absolute phase difference, based on the range of the absolute phase difference, comprises: If the absolute phase difference is less than 18 degrees, the overshoot factor is 0.5; If the absolute phase difference is within the range of 18-72 degrees, the absolute phase difference is substituted into the formula of overshoot factor overshoot=(c-18) / 108+0.5 to obtain the overshoot factor; wherein c represents the absolute phase difference; If the absolute phase difference c exceeds 72 degrees, the overshoot factor is 1.
7. The optimization method according to claim 5, characterized in that: The determining of the convergence factor based on the absolute phase difference and the oscillation amplitude comprises: If the absolute phase difference is between 30 and 90 degrees, the absolute phase difference is substituted into the formula of convergence speed = (90-c) / 120 to obtain the convergence factor; wherein c represents the absolute phase difference; If the absolute phase difference is less than 30 degrees, a third ratio of the oscillation amplitude vmean to 2*error is calculated, and it is determined whether the third ratio is greater than 2; If the third ratio is less than or equal to 2, the third ratio is substituted into the convergence speed = f / 2, the convergence factor is obtained; where, f is the third ratio; If the third ratio is greater than 2, the convergence factor is 1.
8. The optimization method according to claim 2, characterized in that: When the SV curve changes, the optimization of the proportionality and the integral time in the PID parameters based on the convergence factor and the overshoot factor includes: If the overshoot factor is less than 0.5 and the convergence factor is less than 0.5, the optimized proportionality PB new and the optimized integration time Ti new The calculation formula is as follows: ; ; In the formula, PB old is the proportionality before optimization; overshoot is the overshoot factor; convergencespeed is the convergence factor; Ti old is the integration time before optimization; Alternatively, if the overshoot factor is greater than or equal to 0.5 and the convergence factor is less than 0.5, then the optimized proportionality PB new and the optimized integration time Ti new The calculation formula is as follows: ; ; Alternatively, if the overshoot factor is less than 0.5 and the convergence factor is greater than 0.5, the optimized proportionality PB new and the optimized integration time Ti new The calculation formula is as follows: ; ; Alternatively, if the overshoot factor is greater than or equal to 0.5 and the convergence factor is greater than or equal to 0.5, then the optimized proportionality PB new and the optimized integration time Ti new The calculation formula is as follows: ; 。 9. The optimization method according to claim 2, characterized in that: When the SV curve does not change, optimizing the proportionality and integral time in the PID parameters based on the convergence factor and the overshoot factor includes: If the overshoot factor is less than 0.5 and the convergence factor is less than 0.5, the optimized proportionality PB new and the optimized integration time Ti new The calculation formula is as follows: ; ; In the formula, PB old is the proportionality before optimization; overshoot is the overshoot factor; convergencespeed is the convergence factor; Ti old is the integration time before optimization; Alternatively, if the overshoot factor is greater than or equal to 0.5 and the convergence factor is less than 0.5, then the optimized proportionality PB new and the optimized integration time Ti new The calculation formula is as follows: ; ; Alternatively, if the overshoot factor is less than 0.5 and the convergence factor is greater than 0.5, the optimized proportionality PB new and the optimized integration time Ti new The calculation formula is as follows: ; ; Alternatively, if the overshoot factor is greater than or equal to 0.5 and the convergence factor is greater than or equal to 0.5, then the optimized proportionality PB new and the optimized integration time Ti new The calculation formula is as follows: ; 。 10. A PID control system, characterized in that: It comprises a controller, wherein the controller is used to execute the optimization method of PID parameters of the PID control system according to any one of claims 1 to 9.
Citation Information
Patent Citations
PID parameter setting method based on image recognition
CN114740708A
Online feedback parameter optimization method and system of PI system
CN116300405A
Performance evaluation method and evaluation device for PID (Proportion Integration Differentiation) control loop
CN117192971A
Parameter setting method based on curve form of control loop
CN117434830A
PID controller parameter setting method, apparatus and device, and storage medium
CN117742790A
Cited By
Optimization method for PID parameters of PID control system, and system thereof
WO2026124368A1