⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 plotpole.m

📁 matlab 专业设计 源于课本的原文件 适合于编程人员
💻 M
字号:
function plot_poles(sscl, t_settle, damp_ratio)

%PLOT_POLES  Plot system pole locations  with settling time and damping ratio constraints.
%
%   PLOT_POLES(SSCL, T_SETTLE, DAMP_RATIO)
%
%   This function plots the pole locations for the closed loop
%   system SSCL along with the settling time constraint
%   T_SETTLE (in seconds) and damping ratio DAMP_RATIO.

%   By Jim Ledin, 2002.

plot(pole(sscl), 'o')

axis equal
a = axis;
x_min = a(1); x_max = a(2);
y_min = a(3); y_max = a(4);

settling_pct = 0.01; % If no settling percentage given, use 1%
settling_limit = -log(settling_pct) / t_settle;
if x_max < -settling_limit + 0.1*(x_max - x_min)
    x_max = -settling_limit + 0.1*(x_max - x_min);
    a(2) = x_max;
end

hold on
plot([x_min x_max], [0 0], '--k')
plot([0 0], [y_min y_max], '--k')

plot([-settling_limit -settling_limit], [y_min y_max]);

angle = acos(damp_ratio);
plot([x_min 0 x_min], [x_min*tan(angle) 0 -x_min*tan(angle)])

axis(a)
hold off

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -