Intelligent regulating instrument based on PID self-tuning
Patent Information
- Application Number
- CN202611086279.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-21
- Publication Date
- 2026-10-30
AI Technical Summary
现有基于继电反馈的自整定调节仪已实现了基本的一键整定功能,但仍存在明显不足:一是继电特性的回差宽度固定或需人工设置,在噪声干扰大的工业现场易导致误触发或整定失败;二是整定策略单一,通常仅采用固定的Z-N公式,对不同动态特性(如大滞后、快响应)的被控对象适应性差;三是整定完成后参数固定不变,无法适应对象时变、负载扰动等工况变化,且缺乏对整定结果控制品质的在线评估与优化机制
本发明通过继电反馈测试模块根据测量值信号的噪声水平自动调整回差宽度,有效抑制工业现场噪声干扰引起的误触发,确保极限环振荡的稳定形成,提高自整定成功率;智能整定决策模块根据被控对象特性自动分类并匹配整定规则,针对不同动态特性的对象采用差异化整定策略,避免单一Z-N公式在大滞后或快响应系统中的适用性不足问题;在线优化模块在PID运行过程中实时监测超调量、调节时间等品质指标,通过模式识别法自动微调参数,实现“整定-运行-优化”的闭环自进化,适应对象时变和负载扰动;模式切换模块具备安全条件判断、平滑过渡和异常保护功能,自整定前自动校验系统状态,切换时通过斜坡函数防止控制量突变,异常时自动终止并报警,确保生产过程安全;一键启动自整定、图形化进度显示、远程参数上传等功能使普通操作员即可完成调试,减少对高水平技术人员的依赖,降低工程实施和后期维护成本。
Smart Images

Figure CN123010365A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent instruments and meters for transmitters, and in particular to an intelligent controller based on PID self-tuning. Background Technology
[0002] PID control is the most widely used control strategy in industrial process control. Its principle is simple, its applicability is strong, and it accounts for over 90% of industrial control loops. However, the performance of PID control is highly dependent on the rationality of parameter tuning. The matching of the three parameters—proportional gain, integral time, and derivative time—directly determines the system's stability, response speed, and steady-state accuracy. Traditional manual trial-and-error methods for tuning PID parameters require extremely high operator experience and are difficult to adapt to complex operating conditions and multivariable coupled systems. Therefore, self-tuning PID technology has emerged, automatically identifying the characteristics of the controlled object and calculating PID parameters through methods such as relay feedback, step response, or pattern recognition, significantly reducing the difficulty of tuning.
[0003] Relay feedback is currently the most mature PID self-tuning technology. It uses the nonlinear characteristics of a relay to generate a limit cycle oscillation in the system, thereby extracting the critical gain and critical period, and then calculating the PID parameters according to formulas such as Ziegler-Nichols. Existing self-tuning controllers based on relay feedback have achieved basic one-click tuning functions, but there are still significant shortcomings: First, the hysteresis width of the relay characteristics is fixed or requires manual setting, which can easily lead to false triggering or tuning failure in noisy industrial environments; second, the tuning strategy is singular, usually only using a fixed ZN formula, which has poor adaptability to controlled objects with different dynamic characteristics (such as large hysteresis and fast response); third, the parameters remain unchanged after tuning, which cannot adapt to changes in operating conditions such as time-varying objects and load disturbances, and there is a lack of online evaluation and optimization mechanisms for the control quality of the tuning results.
[0004] Furthermore, existing self-tuning controllers are weak in terms of mode switching safety. Before self-tuning, manual judgment is required to determine whether the system allows on-off control. The switching process lacks a smooth transition mechanism, and automatic protection is not available in case of abnormal disturbances or oscillations during self-tuning. Therefore, there is an urgent need for a PID self-tuning intelligent controller with hysteresis adaptive capability, multi-strategy intelligent selection, online closed-loop optimization, and safe mode switching to overcome the limitations of existing technologies and meet the increasingly demanding control quality requirements of complex industrial processes. Summary of the Invention
[0005] In view of the above background and the problems existing in the prior art, the present invention provides an intelligent controller based on PID self-tuning, characterized in that it includes: an input signal processing module, used to receive the measured value signal and the set value signal of the controlled object, and to perform filtering processing and range conversion on the measured value signal to obtain a standardized deviation signal; The relay feedback test module is electrically connected to the input signal processing module and is used to output a relay excitation signal with adjustable hysteresis characteristics to the controlled object in self-tuning mode, so that the controlled object generates stable limit loop oscillation and collects the output waveform data of the oscillation process. The parameter identification module is electrically connected to the relay feedback test module and is used to calculate the critical gain and critical oscillation period of the controlled object based on the output waveform data, and extract the frequency response characteristic parameters of the controlled object based on the critical gain and critical oscillation period using the describing function method. The intelligent tuning decision module is electrically connected to the parameter identification module and is used to automatically select a tuning strategy from multiple preset tuning rules based on the frequency response characteristic parameters and the classification results of the dynamic characteristics of the controlled object, and to calculate the initial PID parameter set. The online optimization module is electrically connected to the intelligent tuning decision module. It is used to monitor the control quality indicators in real time during the operation of PID control, and to perform closed-loop iterative optimization of the initial PID parameter set based on the control quality indicators to obtain the optimized PID parameter set. The PID calculation module is electrically connected to the online optimization module and is used to perform incremental PID calculation according to the optimized PID parameter group and output a control signal. An output drive module, electrically connected to the PID calculation module, is used to convert the control signal into a standard drive signal and output it to the actuator. The mode switching module is electrically connected to the relay feedback test module, the PID calculation module and the output drive module respectively, and is used to safely switch between the self-tuning mode and the PID control mode according to external instructions or automatic judgment conditions.
[0006] As a further explanation of the present invention, the relay feedback test module includes: a hysteresis adaptive adjustment unit, used to automatically adjust the hysteresis width of the relay characteristics according to the noise level of the measured signal; An oscillation stability determination unit is used to detect whether the output waveform forms a stable limiting cycle oscillation; the determination unit calculates the coefficient of variation of the time interval between adjacent zero crossings. The data sampling unit is used to acquire output waveform data for at least three complete cycles after the oscillation stabilizes, and to calculate the first harmonic amplitude and oscillation period of the output waveform.
[0007] Furthermore, the parameter identification module includes: a critical parameter calculation unit, used to calculate the critical gain based on the relay characteristic amplitude and the first harmonic amplitude, and to calculate the critical oscillation period based on the oscillation period; the calculation formula for the critical gain is:
[0008] Where Ku is the critical gain, d is the relay characteristic amplitude, and a is the first harmonic amplitude of the output waveform; The model parameter estimation unit is used to estimate the transfer function model parameters of the controlled object based on the critical gain and critical oscillation period using a frequency domain fitting algorithm. The frequency response storage unit is used to store the response data of the controlled object at multiple frequency points and to construct a nonparametric frequency response model of the controlled object.
[0009] Furthermore, the intelligent tuning decision module includes: a tuning rule library, which stores multiple sets of tuning rules for different controlled object characteristics; the tuning rules include classical tuning rules based on the Ziegler-Nichols critical proportional gain method, IMC tuning rules based on internal model control theory, robust tuning rules based on phase margin constraints, and Smith predictor compensation tuning rules for objects with large time delays; A rule selector is used to automatically select a set of tuning rules from the tuning rule library based on the classification results of the feature classifier and the user's settings for control performance preferences. The parameter calculator is used to calculate the initial proportional gain, integral time, and derivative time based on the selected tuning rule and the frequency response characteristic parameters.
[0010] Furthermore, the online optimization module includes: a quality assessment unit, used to calculate the control quality index in each sampling period and to comprehensively calculate the control quality comprehensive score; The parameter fine-tuning unit is used to start the parameter fine-tuning program when the overall control quality score is lower than a preset threshold. The convergence judgment unit is used to determine whether the parameter fine-tuning has converged.
[0011] Furthermore, the PID calculation module includes: an incremental PID calculation unit, used to execute the incremental PID control algorithm and output the control increment; the formula for the incremental PID calculation is:
[0012] Where △u(k) is the control increment at time k, Kp is the proportional gain, Ti is the integral time, Td is the derivative time, T is the sampling period, and e(k) is the deviation at time k. The anti-integral saturation unit is used to stop the accumulation of the integral term when the control quantity reaches the upper or lower limit of the output, so as to prevent overshoot and oscillation caused by integral saturation. The differential lead unit is used to perform differential operations on the measured value signal rather than the deviation signal, so as to avoid the differential term from being impacted when the set value changes abruptly.
[0013] Furthermore, the input signal processing module includes: A multi-channel analog input unit is used to receive analog signals from different types of sensors; A digital filtering unit is used to perform digital filtering processing on the analog signal; The engineering unit conversion unit is used to convert filtered digital quantities into engineering unit quantities with physical meaning.
[0014] Furthermore, the output driving module includes: The control quantity limiting unit is used to limit the control quantity signal within a preset safe output range. The output mode selection unit is used to select the output mode according to the type of actuator. The manual / automatic switching unit is used to seamlessly switch between manual output mode and automatic PID control mode.
[0015] Furthermore, the mode switching module includes: The safety condition judgment unit is used to determine whether the controlled object meets the safety self-tuning conditions before switching to the self-tuning mode. An anomaly protection unit is used to monitor whether the output of the controlled object is abnormal during the self-tuning process; The automatic recovery unit after tuning is completed is used to automatically switch the working mode back to PID control mode after the self-tuning is completed, and load the calculated optimized PID parameter set into the PID calculation module.
[0016] The beneficial effects of this invention are: This invention utilizes a relay feedback testing module to automatically adjust the hysteresis width based on the noise level of the measured signal, effectively suppressing false triggering caused by noise interference in industrial settings, ensuring the stable formation of limit loop oscillations, and improving the success rate of self-tuning. The intelligent tuning decision module automatically classifies and matches tuning rules based on the characteristics of the controlled object, employing differentiated tuning strategies for objects with different dynamic characteristics, avoiding the insufficient applicability of a single ZN formula in systems with large time delays or fast responses. The online optimization module monitors quality indicators such as overshoot and settling time in real time during PID operation, automatically fine-tuning parameters through pattern recognition to achieve a closed-loop self-evolution of "tuning-running-optimization," adapting to time-varying objects and load disturbances. The mode switching module features safety condition judgment, smooth transition, and anomaly protection functions. It automatically verifies the system status before self-tuning, prevents sudden changes in control quantities during switching using a ramp function, and automatically terminates and alarms in case of an anomaly, ensuring production process safety. One-click start of self-tuning, graphical progress display, and remote parameter uploading functions allow ordinary operators to complete debugging, reducing reliance on highly skilled technicians and lowering engineering implementation and subsequent maintenance costs. Attached Figure Description
[0017] Figure 1This is a block diagram illustrating the modular structure principle of the intelligent regulator based on PID self-tuning of the present invention. Figure 2 This is a flowchart of the main signal parameters of the intelligent regulator based on PID self-tuning of the present invention. Detailed Implementation
[0018] Example: The embodiments of the present invention will now be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments.
[0019] In the description of this invention, it should be understood that the terms "upper", "lower", "front", "rear", "left", "right", "top", "bottom", "inner", "outer", etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are only for the convenience of describing this invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on this invention.
[0020] See appendix Figure 1 As shown, an intelligent controller based on PID self-tuning includes: an input signal processing module, used to receive the measured value signal and the set value signal of the controlled object, perform filtering processing and range conversion on the measured value signal, and obtain a standardized deviation signal; The relay feedback test module is electrically connected to the input signal processing module and is used to output a relay excitation signal with adjustable hysteresis characteristics to the controlled object in self-tuning mode, so that the controlled object generates stable limit loop oscillation and collects the output waveform data of the oscillation process. The parameter identification module is electrically connected to the relay feedback test module and is used to calculate the critical gain and critical oscillation period of the controlled object based on the output waveform data, and extract the frequency response characteristic parameters of the controlled object based on the critical gain and critical oscillation period using the describing function method. The intelligent tuning decision module, electrically connected to the parameter identification module, is used to automatically select a tuning strategy from a set of preset tuning rules based on the frequency response characteristic parameters and the classification results of the dynamic characteristics of the controlled object, and to calculate the initial PID parameter set. The intelligent tuning decision module includes a controlled object characteristic classifier, which automatically classifies the controlled object into fast response, standard, or slow response types based on the ratio of the gain, time constant, and lag time of the controlled object, and calls the corresponding tuning rules for each type. An online optimization module, electrically connected to the intelligent tuning decision module, is used to monitor control quality indicators in real time during PID control operation, and to perform closed-loop iterative optimization of the initial PID parameter set based on the control quality indicators to obtain an optimized PID parameter set; the control quality indicators include overshoot, settling time, integral absolute error, and steady-state error; The PID calculation module is electrically connected to the online optimization module and is used to perform incremental PID calculation according to the optimized PID parameter group and output a control signal. An output drive module, electrically connected to the PID calculation module, is used to convert the control signal into a standard drive signal and output it to the actuator. The mode switching module is electrically connected to the relay feedback test module, the PID calculation module, and the output drive module, respectively, and is used to safely switch between self-tuning mode and PID control mode according to external instructions or automatic judgment conditions. The mode switching module includes a smooth transition unit, which is used to gradually process the output signal through a ramp function during mode switching to prevent sudden changes in control quantity.
[0021] Specifically, in this embodiment, the relay feedback test module includes: a hysteresis adaptive adjustment unit, used to automatically adjust the hysteresis width of the relay characteristics according to the noise level of the measured signal; the hysteresis width is positively correlated with the noise amplitude, and when the noise amplitude is greater than a preset threshold, the hysteresis width is automatically increased to suppress false triggering caused by interference; after self-tuning starts, the noise level of the measured signal is first detected. The noise detection method is: when the system is in steady state, 100 sampling periods of measured values are collected, and its standard deviation σ is calculated as the noise amplitude estimate. The hysteresis width Hy is automatically calculated according to the formula Hy=3σ to ensure that the hysteresis width is 3 times the noise standard deviation, which both suppresses false triggering caused by noise and avoids excessive hysteresis leading to limit cycle oscillation distortion. When σ<0.1% of the range, the minimum hysteresis Hy_min=0.3% of the range is set; when σ>2% of the range, the maximum hysteresis Hy_max=6% of the range is set.
[0022] The oscillation stability assessment unit is used to detect whether the output waveform forms a stable limiting cycle oscillation. It records the time interval Ti (i=1,2,3...) between two consecutive positive zero-crossings using a zero-crossing detection algorithm. The coefficient of variation CV = σ_T / μ_T is calculated, where σ_T is the standard deviation of the time interval and μ_T is the mean of the time interval. When the coefficient of variation CV for three consecutive periods is less than 0.05, the oscillation is determined to have reached a stable state, and a stability flag is sent to the data sampling unit. The data sampling unit is used to acquire output waveform data for at least three complete cycles after the oscillation stabilizes, and to calculate the first harmonic amplitude and oscillation period of the output waveform. The sampling frequency is 1 kHz, and at least 200 points are acquired per cycle. First harmonic analysis is performed on the acquired data: the fundamental component amplitude 'a' and phase are extracted using Discrete Fourier Transform (DFT), and the fundamental frequency is the oscillation frequency ω = 2π / T. The first harmonic amplitude 'a' is used for subsequent critical gain calculation, and the oscillation period Tosc = 2π / ω is the critical oscillation period.
[0023] Specifically, in this embodiment, the parameter identification module includes: a critical parameter calculation unit, used to calculate the critical gain based on the relay characteristic amplitude and the first harmonic amplitude, and to calculate the critical oscillation period based on the oscillation period; the calculation formula for the critical gain is:
[0024] Where Ku is the critical gain, d is the relay characteristic amplitude, and a is the first harmonic amplitude of the output waveform; the critical oscillation period Tu is directly taken as the oscillation period Tosc measured by the data sampling unit.
[0025] The model parameter estimation unit is used to estimate the transfer function model parameters of the controlled object, including the object gain, time constant, and lag time, based on the critical gain and critical oscillation period using a frequency domain fitting algorithm. After obtaining Ku and Tu, the model parameter estimation unit further estimates the transfer function model parameters of the controlled object. For a typical first-order plus pure time delay (FOPDT) model G(s)=Ke^(-τs) / (Ts+1), at the critical frequency ωu=2π / Tu, the amplitude and phase of the controlled object satisfy:
[0026] K, T, and τ are estimated by iteratively solving the following system of equations:
[0027]
[0028] The initial values are set as K=1.2 / Ku, T=Tu / 2π, τ=Tu / 4. The Newton-Raphson iterative method is used to solve the problem. The convergence accuracy is set to 10^(-6). It can be converged in 5 to 10 iterations.
[0029] The frequency response storage unit stores the response data of the controlled object at multiple frequency points, constructing a nonparametric frequency response model of the controlled object. During the self-tuning process, in addition to recording the critical frequency points, the frequency response data of the controlled object at multiple excitation levels is obtained by changing the relay amplitude d (e.g., setting it to 3%, 5%, and 7% of the range sequentially), thus constructing a nonparametric frequency response model. This nonparametric model is stored in the form of a frequency-amplitude-phase data table, used for subsequent verification of the accuracy of the parametric model and to provide data support for advanced control strategies (such as robust control).
[0030] Specifically, in this embodiment, the intelligent tuning decision module includes: a tuning rule library, storing multiple sets of tuning rules for different controlled object characteristics; the tuning rules include classical tuning rules based on the Ziegler-Nichols critical proportional gain method, IMC tuning rules based on internal model control theory, robust tuning rules based on phase margin constraints, and Smith predictor compensation tuning rules for objects with large time delays. The Ziegler-Nichols classical tuning rule: Kp=0.6Ku, Ti=0.5Tu, Td=0.125Tu, suitable for general applications, with fast response but large overshoot. The IMC tuning rule: based on internal model control theory, taking the closed-loop time constant Tc=max(0.25T,0.2τ), then Kp=T / (K(Tc+τ)), Ti=T, Td=0 (when τ / T<0.5) or Td=τT / (T+τ) (when τ / T≥0.5), suitable for applications requiring high robustness. Robust tuning rule: Based on phase margin constraints, with a target phase margin φm = 60°, the PID parameters are obtained by solving the following equations:
[0031]
[0032] Where ωgc is the gain crossover frequency, this rule is applicable to situations with large model uncertainties.
[0033] Smith predictor compensation tuning rule: For objects with large time lag τ / T>0.5, the Smith predictor structure is adopted, the main controller is tuned according to the IMC rule, and the predicted model parameters are taken from the model parameter estimation unit. It is suitable for large time lag temperature control and other applications.
[0034] A rule selector is used to automatically select a set of tuning rules from the tuning rule library based on the classification results of the feature classifier and the user's settings for control performance preferences. The control performance preferences include fast response, balanced, and robust types. The rule selector automatically selects tuning rules based on the feature classification results (e.g., τ / T<0.2 is fast response, 0.2≤τ / T≤0.5 is standard, τ / T>0.5 is slow response, etc.) and the user's control performance preferences.
[0035] The parameter calculator calculates the initial proportional gain Kp0, integral time Ti0, and derivative time Td0 based on the selected rules and frequency response characteristic parameters. The calculation results are then output to the online optimization module after being clipped.
[0036] Specifically, in this embodiment, the online optimization module includes a quality evaluation unit, a parameter fine-tuning unit, and a convergence judgment unit.
[0037] The quality assessment unit calculates the following control quality indicators in each sampling period (100ms): (1) Overshoot σ = (PV_max - SV) / SV × 100%, where PV_max is the maximum value of the measured value after a step change of the set value.
[0038] (2) Adjustment time ts: The time required for the measured value to enter the error band of ±2% of the set value and no longer exceed the required value.
[0039] (3) The integral absolute error IAE = ∫|e(t)|dt is calculated using numerical integration.
[0040] (4) Steady-state error ess = |PV-SV| / SV×100%, calculated after the system stabilizes (|de / dt|<0.1% / s for 10s).
[0041] The overall quality control score Q is calculated using a weighted summation method:
[0042] The weights are automatically adjusted based on control performance preferences: fast response type (w1=0.2, w2=0.4, w3=0.3, w4=0.1); balanced type (w1=0.25, w2=0.25, w3=0.25, w4=0.25); robust type (w1=0.4, w2=0.1, w3=0.3, w4=0.2). The Q value ranges from 0 to 1, with values closer to 1 indicating better control quality.
[0043] The parameter fine-tuning unit starts the parameter fine-tuning procedure when Q < 0.7: (1) If the deviation signal shows monotonically converging (without overshoot), it is determined to be an overdamped state. Increase the integral action (Ti decreases by 10%) to enhance the ability to eliminate steady-state error.
[0044] (2) If the deviation signal shows a decaying oscillation (overshoot > 10%), it is determined to be an underdamped state. Reduce the proportional gain (Kp decreases by 10%) or increase the derivative time (Td increases by 20%) to suppress overshoot.
[0045] (3) If the deviation signal exhibits constant amplitude or divergent oscillation, it is determined to be an oscillation state. The proportional gain is significantly reduced (Kp is reduced by 30%) and the integration time is increased (Ti is increased by 50%) to stabilize the system.
[0046] After each fine-tuning, the system should be run for at least 5 adjustment cycles (or 300 seconds, whichever is greater) before evaluating the quality indicators to avoid frequent adjustments that could lead to system instability.
[0047] The convergence judgment unit determines whether the parameter fine-tuning has converged. Convergence is determined when the Q-value improvement after three consecutive fine-tunings is less than 5% (i.e., |Q_new-Q_old| / Q_old < 0.05), or when the Q-value has exceeded 0.85 for three consecutive times. Upon convergence, the current PID parameters are locked, fine-tuning stops, and the optimized PID parameter set (Kp*, Ti*, Td*) is output to the PID calculation module.
[0048] Specifically, in this embodiment, the PID calculation module includes: an incremental PID calculation unit, used to execute an incremental PID control algorithm and output the control increment; the formula for the incremental PID calculation is:
[0049] Where Δu(k) is the control increment at time k, Kp is the proportional gain, Ti is the integral time, Td is the derivative time, T is the sampling period, and e(k) is the deviation at time k; for example, if T = 100 ms is the sampling period, e(k) = SV - PV(k) is the deviation at time k, and the control output is u(k) = u(k-1) + Δu(k). To eliminate differential impact, the differential lead unit performs differential calculation on the measured value PV instead of the deviation e. The improved incremental algorithm is as follows:
[0050] The anti-integral saturation unit is used to stop the accumulation of the integral term when the control quantity reaches the upper or lower limit of the output, so as to prevent overshoot and oscillation caused by integral saturation. The anti-integral saturation unit monitors the control quantity u(k). When u(k)≥u_max (the upper limit of the output, such as 100%) or u(k)≤u_min (the lower limit of the output, such as 0%), it stops the accumulation of the integral term, that is, it sets e(k)=0 to enter the integral calculation, so as to prevent overshoot and oscillation caused by integral saturation. When the control quantity leaves the saturation region, the integral action is automatically restored.
[0051] Specifically, in this embodiment, the input signal processing module includes: A multi-channel analog input unit is used to receive analog signals from different types of sensors; the analog signals include 4~20mA current signals, 0~10V voltage signals, and thermocouple / resistance temperature signals; A digital filtering unit is used to perform digital filtering on the analog signal; the digital filtering adopts a combination of moving average filtering and amplitude limiting filtering. First, the amplitude limiting filter removes abnormal jump values, and then the moving average filter smooths random noise. The engineering unit conversion unit is used to convert the filtered digital quantity into a physical unit quantity; the conversion includes linear conversion, thermocouple nonlinearity correction, and resistance temperature detector (RTD) table lookup conversion.
[0052] Specifically, in this embodiment, the output driving module includes: A control quantity limiting unit is used to limit the control quantity signal within a preset safe output range; the safe output range includes a lower output limit and an upper output limit to prevent the actuator from overtraveling. The output mode selection unit is used to select the output mode according to the type of actuator; the output modes include 4~20mA analog current output, 0~10V analog voltage output, solid-state relay pulse output, and thyristor phase-shift trigger output. The manual / automatic switching unit is used to seamlessly switch between manual output mode and automatic PID control mode; the seamless switching is achieved by tracking the current manual output value as the initial value for PID calculation.
[0053] Specifically, in this embodiment, the mode switching module includes: The safety condition judgment unit is used to determine whether the controlled object meets the safety self-tuning conditions before switching to the self-tuning mode; the safety conditions include: the controlled object is in a steady state or quasi-steady state, the set value is within the allowable range, there are no strong external interference signals, and the actuator is in normal working condition. An anomaly protection unit is used to monitor whether the output of the controlled object is abnormal during the self-tuning process. The anomaly includes the output amplitude exceeding the safety limit, oscillation divergence, or no response for a long time. When an anomaly occurs, the anomaly protection unit automatically terminates the self-tuning process and switches back to PID control mode, while issuing an alarm signal. The automatic recovery unit after tuning is completed is used to automatically switch the working mode back to PID control mode after the self-tuning is completed, and load the calculated optimized PID parameter set into the PID calculation module.
[0054] The overall workflow of the intelligent regulator of this invention is as follows: (1) After the system is powered on, it will enter the PID control mode by default and run using the previously stored PID parameters or the default parameters.
[0055] (2) The operator issues a self-tuning start command through the human-machine interaction module, or the system automatically triggers self-tuning according to preset conditions (such as continuous deterioration of control quality).
[0056] (3) The safety condition judgment unit of the mode switching module checks the system status, and switches to the self-tuning mode after the conditions are met.
[0057] (4) The relay feedback test module is started, the hysteresis adaptive adjustment unit detects the noise level and sets the hysteresis width, and the relay outputs ±d excitation signal.
[0058] (5) The controlled object generates limit cycle oscillation under relay excitation. After the oscillation stability judgment unit detects that the oscillation is stable, the data sampling unit collects waveform data.
[0059] (6) The parameter identification module calculates the critical gain Ku and critical period Tu, estimates the object model parameters K, T and τ, and constructs the frequency response model.
[0060] (7) The intelligent tuning decision module selects tuning rules based on the τ / T ratio classification object type and calculates the initial PID parameter set.
[0061] (8) The mode switching module automatically switches back to PID control mode and loads the initial PID parameters.
[0062] (9) The online optimization module evaluates the control quality in real time. When the quality score is lower than the threshold, parameter fine-tuning is initiated until convergence.
[0063] (10) The optimized PID parameters are automatically saved as the default parameters for the next power-on.
[0064] The above description only illustrates preferred embodiments of the present invention and should not be construed as limiting the scope of the claims. The present invention is not limited to the above embodiments, and variations in its specific structure are permitted. In short, all variations made within the scope of the independent claims of the present invention are within the scope of protection of the present invention.
Claims
1. An intelligent regulator based on PID self-tuning, characterized in that, include: The input signal processing module is used to receive the measured value signal and the set value signal of the controlled object, perform filtering and range conversion on the measured value signal, and obtain the standardized deviation signal. The relay feedback test module is electrically connected to the input signal processing module and is used to output a relay excitation signal with adjustable hysteresis characteristics to the controlled object in self-tuning mode, so that the controlled object generates stable limit loop oscillation and collects the output waveform data of the oscillation process. The parameter identification module is electrically connected to the relay feedback test module and is used to calculate the critical gain and critical oscillation period of the controlled object based on the output waveform data, and extract the frequency response characteristic parameters of the controlled object based on the critical gain and critical oscillation period using the describing function method. The intelligent tuning decision module is electrically connected to the parameter identification module and is used to automatically select a tuning strategy from multiple preset tuning rules based on the frequency response characteristic parameters and the classification results of the dynamic characteristics of the controlled object, and to calculate the initial PID parameter set. The online optimization module is electrically connected to the intelligent tuning decision module. It is used to monitor the control quality indicators in real time during the operation of PID control, and to perform closed-loop iterative optimization of the initial PID parameter set based on the control quality indicators to obtain the optimized PID parameter set. The PID calculation module is electrically connected to the online optimization module and is used to perform incremental PID calculation according to the optimized PID parameter group and output a control signal. An output drive module, electrically connected to the PID calculation module, is used to convert the control signal into a standard drive signal and output it to the actuator. The mode switching module is electrically connected to the relay feedback test module, the PID calculation module and the output drive module respectively, and is used to safely switch between the self-tuning mode and the PID control mode according to external instructions or automatic judgment conditions.
2. The intelligent regulator based on PID self-tuning according to claim 1, characterized in that: The relay feedback test module includes: a hysteresis adaptive adjustment unit, used to automatically adjust the hysteresis width of the relay characteristics according to the noise level of the measured signal; An oscillation stability determination unit is used to detect whether the output waveform forms a stable limiting cycle oscillation; the determination unit calculates the coefficient of variation of the time interval between adjacent zero crossings. The data sampling unit is used to acquire output waveform data for at least three complete cycles after the oscillation stabilizes, and to calculate the first harmonic amplitude and oscillation period of the output waveform.
3. The intelligent regulator based on PID self-tuning according to claim 1, characterized in that: The parameter identification module includes a critical parameter calculation unit, used to calculate the critical gain based on the relay characteristic amplitude and the first harmonic amplitude, and to calculate the critical oscillation period based on the oscillation period; the calculation formula for the critical gain is: Where Ku is the critical gain, d is the relay characteristic amplitude, and a is the first harmonic amplitude of the output waveform; The model parameter estimation unit is used to estimate the transfer function model parameters of the controlled object based on the critical gain and critical oscillation period using a frequency domain fitting algorithm. The frequency response storage unit is used to store the response data of the controlled object at multiple frequency points and to construct a nonparametric frequency response model of the controlled object.
4. The intelligent regulator based on PID self-tuning according to claim 1, characterized in that: The intelligent tuning decision module includes: a tuning rule library, which stores multiple sets of tuning rules for different controlled object characteristics; the tuning rules include classical tuning rules based on the Ziegler-Nichols critical proportional method, IMC tuning rules based on internal model control theory, robust tuning rules based on phase margin constraints, and Smith predictor compensation tuning rules for objects with large time delays. A rule selector is used to automatically select a set of tuning rules from the tuning rule library based on the classification results of the feature classifier and the user's settings for control performance preferences. The parameter calculator is used to calculate the initial proportional gain, integral time, and derivative time based on the selected tuning rule and the frequency response characteristic parameters.
5. The intelligent regulator based on PID self-tuning according to claim 1, characterized in that: The online optimization module includes a quality assessment unit, used to calculate the control quality index in each sampling period and to comprehensively calculate the control quality score. The parameter fine-tuning unit is used to start the parameter fine-tuning program when the overall control quality score is lower than a preset threshold. The convergence judgment unit is used to determine whether the parameter fine-tuning has converged.
6. The intelligent regulator based on PID self-tuning according to claim 1, characterized in that: The PID calculation module includes: an incremental PID calculation unit, used to execute the incremental PID control algorithm and output the control increment; the formula for the incremental PID calculation is: Where △u(k) is the control increment at time k, Kp is the proportional gain, Ti is the integral time, Td is the derivative time, T is the sampling period, and e(k) is the deviation at time k. The anti-integral saturation unit is used to stop the accumulation of the integral term when the control quantity reaches the upper or lower limit of the output, so as to prevent overshoot and oscillation caused by integral saturation. The differential lead unit is used to perform differential operations on the measured value signal rather than the deviation signal, so as to avoid the differential term from being impacted when the set value changes abruptly.
7. The intelligent regulator based on PID self-tuning according to claim 1, characterized in that: The input signal processing module includes: A multi-channel analog input unit is used to receive analog signals from different types of sensors; A digital filtering unit is used to perform digital filtering processing on the analog signal; The engineering unit conversion unit is used to convert filtered digital quantities into engineering unit quantities with physical meaning.
8. The intelligent regulator based on PID self-tuning according to claim 1, characterized in that: The output driver module includes: The control quantity limiting unit is used to limit the control quantity signal within a preset safe output range. The output mode selection unit is used to select the output mode according to the type of actuator. The manual / automatic switching unit is used to seamlessly switch between manual output mode and automatic PID control mode.
9. The intelligent regulator based on PID self-tuning according to claim 1, characterized in that, The mode switching module includes: The safety condition judgment unit is used to determine whether the controlled object meets the safety self-tuning conditions before switching to the self-tuning mode. An anomaly protection unit is used to monitor whether the output of the controlled object is abnormal during the self-tuning process; The automatic recovery unit after tuning is completed is used to automatically switch the working mode back to PID control mode after the self-tuning is completed, and load the calculated optimized PID parameter set into the PID calculation module.
