fig6_44.m

来自「包含了控制理论的各种仿真程序」· M 代码 · 共 27 行

M
27 行
字号
%  Figure 6.44      Feedback Control of Dynamic Systems, 4e
%                   Franklin, Powell, Emami

%   Weighting function in Bode's gain-phase theorem

clear all;
close all;

coth=0*ones(1,101);
u=-6:.02:6;
length(u);
for i=1:1:601,
num=exp(.5*abs(u(i)))-exp(-.5*abs(u(i)));
den=exp(.5*abs(u(i)))+exp(.5*abs(u(i)));
tanhu=num/den;
if i == 301, tanhu=.000001; end   % prevents div by zero error
cothu=1/tanhu;
coth(1,i)=log(cothu);
end;
ii=[1:300 302:601];
plot(u(ii),coth(ii));
grid;
xlabel('u');
ylabel('W(u)');
title('Fig. 6.44 Weighting function in Bode s gain-phase theorem');

⌨️ 快捷键说明

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