资源简介
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代码
相关资源
- emd分解matlab代码
- 利用面积法求高阶微分方程系数
- DOA估计MATLAB代码
- DOA估计算法MATLAB程序
- 用matlab实现的图像二值化的三种方法
- TDOA/AOA定位的扩展卡尔曼滤波定位算法
- 可以批量输出患者dicom计划到excel文件
- Matlab模拟三体系统
- 机器人避障仿真matlab程序
- 时域随机子空间模态识别matlab编程
- OFDM MATLAB 通信系统仿真程序
- Matlab 串口调试助手带源码
- 小球沿空间螺旋线运动的动画
- matlab设计滤波器课程设计程序
- S变换 matlab源码
- ARIMA模型的MATLAB实现
- ARMA模型的MATLAB实现
- matlab 音调跟踪Pitch Tracking
- 遗传算法优化BP神经网络,以非线性函
- 粒子群算法在物流中心选址中的应用
- Sick激光雷达数据解析程序MATLAB
- MOEA\\Dmatlab注释,帮助大家理解
- LPP,matlab实现
- LDA,matlab实现
- 通信系统的matlab仿真
- 高斯光透镜变换后的matlab程序
- matlab模型预测控制
- 基于MATLAB的虹膜定位
- 量子聚类--matlab
- yolomatlab.zip
评论
共有 条评论