资源简介
pid中参数整定的matlab 代码 很好用

代码片段和文件信息
%% Learning PID Tuning II: Stability Margin
% The PID controller is the most widely used controller in various
% engineering systems. However appropriately tuning a PID controller is
% not an easy task althrough it has only three parameters at most. The
% difficulty particially comes from some comfilict requirements of control
% system performance and partially is due to complicated impacts of PID
% parameters on control performance. This submission provides the second
% tutorial on PID tuning using the stability margin.
%
%% Ziegler-Nichols Tuning Rule
% Ziegler-Nichols tuning rule was the first such effort to provide a
% practical approach to tune a PID controller. According to the rule a PID
% controller is tuned by firstly setting it to the P-only mode but adjusting
% the gain to make the control system in continuous oscillation. The
% corresponding gain is referred to as the ultimate gain (Ku) and the
% oscillation period is termed as the ultimated period (Pu). Then the PID
% controller parameters are determined from Ku and Pu using the
% Ziegler-Nichols tuning table.
%
%
%
% Controller Kc Ti Td
% P Ku / 2
% PI Ku / 2.2 Pu / 1.2
% PID Ku / 1.7 Pu / 2 Pu / 8
%
%
%
%% Determine the Ultimate Gain and Period
% The key step of the Ziegler-Nichols tuning approach is to determine the
% untimate gain and period. However to determine the ultimate gain and
% period experimentally is time comsuming. Since the continuous oscillation
% mode correcponds to the critical stable condition for linear systems
% such a condition can be easily determined through stability margins.
% Other tools such as the Routh criterion and the Evans root locus cannot
% deal with a time-delay directly.
%
% Let the plant have gain margin Gm at crossover frequency Wcg. This
% equivalent to connect with a unit gain controller. Therefore if the
% controller gain increases by Gm then the system will oscillate at
% frequency Wcg. Therefore Ku and Pu can be determined from Gm and Wcg as
% follows:
%
% $$K_u=G_m$$
%
% or
%
% $$20\log_{10}(K_u) = G_m (dB)\\ \Rightarrow\\ K_u=10^{Gm/20}$$
%
% $$P_u=\frac{2\pi}{\omega_{cg}}$$
%
%% Example: PI controller for a first-order plus time-delay system
% The plant has a unit gain time constant 10 and time delay 2
T=10;
dt=2;
G=tf(1[T 1]);
G.InputDelay=dt;
% use the Ziegler-Nichols PID design tool
[kkupu]=znpidtuning(G2);
% verify Ku and Pu using step response of G*ku in 5 periods
step(feedback(ss(G*ku)1)5*pu)
%% Closed-loop step response
% the PI controller transfer function
C=k.kc*(1+tf(1[k.ti 0]));
% get the closed-loop model in state space form since MATLAB/Control Toolbox
% support time-delay only in state-space form.
H=minr
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 1788 2008-02-01 08:40 znpidtuning.m
文件 3434 2008-05-15 08:26 使用帮助:新手必看.htm
文件 10634 2008-02-05 14:49 html\learningpid.html
文件 4430 2008-02-05 14:48 html\learningpid_01.png
文件 3675 2008-02-05 14:48 html\learningpid_02.png
文件 7744 2008-02-05 14:49 html\learningpid_03.png
文件 5354 2008-02-01 14:10 html\learningpid_eq105252.png
文件 1125 2008-02-01 14:10 html\learningpid_eq1339.png
文件 1625 2008-02-01 14:10 html\learningpid_eq14982.png
..A.SH. 13824 2008-10-11 13:42 html\Thumbs.db
目录 0 2008-10-11 13:42 html
文件 3702 2008-02-05 14:48 learningpid.m
文件 183 2008-09-03 11:09 Matlab中文论坛--助努力的人完成毕业设计.url
----------- --------- ---------- ----- ----
57518 13
- 上一篇:锁相环仿真194868
- 下一篇:emd分解matlab代码
相关资源
- matlab_OFDM调制解调(来自剑桥大学)
- Matlab路面裂缝识别69319
- 高灵敏度GPS接收机MATLAB仿真,附捕获
- 基于MATLAB的质点弹道计算与外弹道优
- 阵列天线的matlab仿真
- MATLAB 经典程序源代码大全
- MATLAB小波软阈值去噪代码33473
- 天线阵的波束形成在MATLAB仿真程序及
- 非线性SVM算法-matlab实现
- 《MATLAB 智能算法超级学习手册》-程序
- 组合导航matlab程序
- 读取txt文件内容matlab代码实现
- Matlab实现基于相关的模板匹配程序
- matlab优化工具箱讲解
- 基于MATLAB的快速傅里叶变换
- 光纤传输中的分布傅立叶算法matlab实
- 基于matlab的图像处理源程序
- matlab 椭圆拟合程序
- 算术编码解码matlab源代码
- optical_flow 光流法 matlab 实现程序
- 引导图像滤波器 Matlab实现
- 分形几何中一些经典图形的Matlab画法
- OFDM系统MATLAB仿真代码
- SVM工具箱(matlab中运行)
- 图像小波变换MatLab源代码
- LU分解的MATLAB实现
- 冈萨雷斯数字图像处理matlab版(第三
- 替代数据法的matlab程序
- 用matlab实现的多站定位系统性能仿真
- 通过不同方法进行粗糙集属性约简m
评论
共有 条评论