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

📄 step2trsfun.m

📁 用matlab实现motor运动控制的控制器设计仿真
💻 M
字号:
function G=step2trsfun(x0,yter,t1,t2,td)
% Input:
%    x0-The value of Step input;
%    yter-The stable value of step response;
%    t1-The time at of value 0.4 of unitary step response;
%    t2-The time at of value 0.8 of unitary step response;
%    td-Time delay.
%Output:
%    G-Transfer function of the system.
k=yter/x0;
lmd=t1/t2;
if lmd<=0.39
    n=1;
   elseif lmd>0.39&lmd<=0.49
    n=2;    
elseif lmd>0.49&lmd<=0.55
    n=3;    
elseif lmd>0.55&lmd<=0.60
    n=4;    
elseif lmd>0.60&lmd<=0.63
    n=5;    
elseif lmd>0.63&lmd<=0.66
    n=6;    
elseif lmd>0.66&lmd<=0.67
    n=7;    
elseif lmd>0.67&lmd<=0.69
    n=8;    
elseif lmd>0.69&lmd<=0.72
    n=10;    
elseif lmd>0.72&lmd<=0.74
    n=12;    
elseif lmd>0.74&lmd<=1
    n=14; 
    elseif lmd>1
        error('Input arguments error:t1 should be less than t2 and is positive')
end
T=n*(t1+t2)/2.16;
s=tf('s');
G=k*exp((-td*s))/(T*s+1)^n;

⌨️ 快捷键说明

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