👨🎓个人主页:研学社的博客
💥💥💞💞欢迎来到本博客❤️❤️💥💥
🏆博主优势:🌞🌞🌞博客内容尽量做到思维缜密,逻辑清晰,为了方便读者。
⛳️座右铭:行百里者,半于九十。
📋📋📋本文目录如下:🎁🎁🎁
目录
💥1 概述
使用阶跃响应数据处理具有一阶加延时模型的近似高阶(线性或非线性)系统的过程反应曲线方法。它还提供了一个使用基于经典调谐表的近似模型进行PID控制器设计的示例。它可以很容易地替换为基于相同近似模型的任何其他更高级的调谐表。
阶跃响应称为过程中的过程反应曲线。但是,手动绘制流程的最大斜率 反应曲线既不准确也不方便。提交过程反应曲线提供了获得一阶的工具 加上时间延迟,直接从提供的阶跃响应数据(过程反应曲线)中应用模型。
让我们将此函数应用于 4 阶系统的阶跃响应,然后比较近似值的好坏。
📚2 运行结果
[model,controller]=ReactionCurve(t,y); fprintf('Process gain: %g, Time constant: %g, Time delay: %g\n',model.gain, model.time_constant, model.time_delay) % We can compare how good the approximation is. figure Ga = tf(model.gain,[model.time_constant 1]); set(Ga,'InputDelay',model.time_delay') step(Ga) hold plot(t,y,'--','Linewidth',2) legend('approximation','Process Reaction Curve') % This example shows that the approximation matches the maximum response % speed well but overall response speed is slower than original system. % This is the general behaviour of this approach.
闭环响应比较
K = controller.PID; % Connect it with the 4th-order system to form a closed-loop system. T = feedback(G2*K,1); % The closed-loop response to a step input is as follows. [y,t]=step(T); % Compare it with the ITAE PID controller derived as above % k=znpidtuning(G2,3); K2=2.5622*(1+tf(1,[5.9532 0])+tf([0.4760 0],1)); T2=feedback(G2*K2,1); y2=step(T2,t); figure plot(t,y,'-',t,y2,'--','Linewidth',2) grid legend('Approximate Model Tuning','ITAE Tuning') % Clearly, the ITAE tuning rule gives much better result.
function [model,controller]=ReactionCurve(t,y,u)
% REACTIONCURVE Process Reaction Curve approach to approximate high-order
% systems by a first-order-plus-timedelay model using step
% response data. This model can be used to design a PID
% controller
% [model,P,PI,PID]=ReactionCurve(t,y,u)
%Inputs:
% t: time vector of step repose
% y: output vector of step repose
% u: step input vector or scalar (input change)
%Outputs:
% model: first-order-plus-timedelay model structue, which includes
% gain (steady-state gain), time_constant (first-order time
% constant) and tiem_deltay.
% controllers: structure of transfer functions of P-only, PI and PID
% controllers.
%Example:
% G = tf([2 1],[1 4 6 4 1]); % (2s+1)/(s+1)^4
% [y,t]=step(G); % step response of G
% [model,controler]=ReactionCurve(t,y);
% T=feedback(G*controller.PID,1);
% step(T)
🎉3 参考文献
部分理论来源于网络,如有侵权请联系删除。
[1]苏斌,齐向东.基于模糊PID的新型AUV姿态控制[J].太原科技大学学报,2023,44(02):105-110.
[2]戴文俊,蒋慧,胡艳丽.灰色预测模糊PID控制器在风电机组变桨距控制中的应用[J].长春工业大学学报,2023,44(02):141-146.DOI:10.15923/j.cnki.cn22-1382/t.2023.2.07.
[3]Yi Cao (2023). Learning PID Tuning I: Process Reaction Curve