实验一典型环节的模拟研究Word格式文档下载.docx
《实验一典型环节的模拟研究Word格式文档下载.docx》由会员分享,可在线阅读,更多相关《实验一典型环节的模拟研究Word格式文档下载.docx(13页珍藏版)》请在冰豆网上搜索。
![实验一典型环节的模拟研究Word格式文档下载.docx](https://file1.bdocx.com/fileroot1/2023-1/8/bc767a2c-2d21-4ee2-b49a-b23ab2835b21/bc767a2c-2d21-4ee2-b49a-b23ab2835b211.gif)
2.)惯性环节:
仿真过程及其仿真结果如下:
3.)积分环节:
仿真过程及其结果:
4.微分环节:
仿真过程及其结果:
2.典型控制系统Matlab仿真分析
(1).验证Laplace变换表:
1)
symsstwab
F1=1/s;
f1=ilaplace(F1);
f1=simple(f1)
f1=1
2)
F1=1/s^2;
f1=t
3)
F1=1/(s+a);
f1=exp(-a*t)
4)
F1=1/(s^2+w^2);
f1=sin((w^2)^(1/2)*t)/w
5)
F1=s/(s^2+w^2);
f1=cos(csgn(w)*w*t)
6)
F1=s/(s+a)/(s+b);
f1=1/(b-a)*(b*exp(-b*t)-a*exp(-a*t))
7)
F1=1/(s+a)^2/s;
f1=1/a^2*(1-(1+a*t)*exp(-a*t))
8)
symsstwabn
F1=1/(s+a)^n;
f1=ilaplace((s+a)^(-n),s,t)
symsstwabn
F1=1/(s+a)^5;
f1=1/24*t^4/exp(a*t)
9)
F1=(s+b)/(s+a)/(s^2+w^2);
f1=
(exp(-a*t)*b*w-exp(-a*t)*a*w-b*cos(w*t)*w+a*cos(w*t)*w+w^2*sin(w*t)+a*b*sin(w*t))/(w^3+w*a^2)
10)
F1=(s+a)/((s+b)^2+w^2);
f1=exp(-b*t)*(cos(w*t)*w-b*sin(w*t)+a*sin(w*t))/w
1)p34例2~5
symss
ilaplace((s+2)/(s^2+4*s+3))
ezplot(ilaplace((s+2)/(s^2+4*s+3)),[05]);
grid;
set(gca,'
ytick'
0:
.05:
1.2);
2.)例2~6
f1=ilaplace((s-3)/(s^2+2*s+2))
ezplot(ilaplace((s-3)/(s^2+2*s+2)),[010]);
3.).p34例2~7
ezplot(ilaplace((s+2)/(s^2+2*s+1)/(s^2+3*s)),[020]);
4)P76例2~26
G1=tf([1],[110]);
G2=tf([1],[11]);
G3=tf([101],[144]);
numg4=[11];
deng4=[16];
G4=tf(numg4,deng4);
H1=zpk([-1],[-2],1);
numh2=[2];
denh2=[1];
H3=1;
nh2=conv(numh2,deng4);
dh2=conv(denh2,numg4);
H2=tf(nh2,dh2);
sys1=series(G3,G4);
sys2=feedback(sys1,H1,+1);
sys3=series(G2,sys2);
sys4=feedback(sys3,H2);
sys5=series(G1,sys4);
sys=feedback(sys5,H3)
Zero/pole/gain:
0.083333(s+1)^2(s+2)(s^2+1)
----------------------------------------------------------
(s+10.12)(s+2.44)(s+2.349)(s+1)(s^2+1.176s+1.023)
脉冲响应:
ezplot(ilaplace((0.083333*(s+1)^2*(s+2)*(s^2+1))/(s+10.12)/(s+2.44)/(s+2.349)/(s+1)/(s^2+1.176*s+1.023)),[020]);
单位阶跃响应:
ezplot(ilaplace((0.083333*(s+1)^2*(s+2)*(s^2+1))/s/(s+10.12)/(s+2.44)/(s+2.349)/(s+1)/(s^2+1.176*s+1.023)),[020]);
grid;
5)P78,2~6
symsts;
r=1*sym('
Heaviside(t)'
);
c=1-exp(-2*t)+exp(-t);
R=laplace(r);
C=laplace(c);
G=simple(C/R);
[GN,GD]=numden(simple(C/R))
g=ilaplace(G)
GN=4*s+s^2+2
GD=(s+2)*(1+s)
g=Dirac(t)+2*exp(-2*t)-exp(-t)
所以系统的传递函数是:
G(s)=GN/GD=(4*s+s^2+2)/(s+2)*(1+s)
6.P78,2~7
(1)微分方程拉普拉斯变换:
symstsABCDyx;
z0=A*diff(sym('
y(t)'
),2)+B*diff(sym('
))+C*sym('
z=laplace(z0);
y=laplace(D*sym('
));
S=z-y
S=A*(s*(s*laplace(y(t),t,s)-y(0))-D(y)(0))+B*(s*laplace(y(t),t,s)-y(0))+C*laplace(y(t),t,s)-D/s
(2)微分方程的解:
symstsYXABCD;
A=1;
B=3;
C=2;
D=2;
S=A*s^2*Y+s+B*s*Y+B+C*Y-D/s;
F=solve(S,Y);
f0=ilaplace(F);
y=simple(factor(f0))
y=1+2/exp(t)^2-4/exp(t)
symst
ezplot((y),[0,15])
7.P41,2~13
symstsABCDyxY;
B=1;
C=1;
D=1;
y=1-2*exp(-1/2*t)*cos(1/2*3^(1/2)*t)-2/3*exp(-1/2*t)*3^(1/2)*sin(1/2*3^(1/2)*t)
或者也可以用Matllab直接求解:
symstu;
u=dsolve('
D2u+Du+u=1'
'
u(0)=0.1,Du(0)=0.1'
t'
)
ezplot(u,[0,10])
u=1-7/30*3^(1/2)*exp(-1/2*t)*sin(1/2*3^(1/2)*t)-9/10*exp(-1/2*t)*cos(1/2*3^(1/2)*t)
t=7/30*3^(1/2),t=0.4041