清华出版社 系统仿真导论 答案.docx
《清华出版社 系统仿真导论 答案.docx》由会员分享,可在线阅读,更多相关《清华出版社 系统仿真导论 答案.docx(27页珍藏版)》请在冰点文库上搜索。
![清华出版社 系统仿真导论 答案.docx](https://file1.bingdoc.com/fileroot1/2023-5/27/053f1bf3-c1da-4a96-aeec-66e157093a2e/053f1bf3-c1da-4a96-aeec-66e157093a2e1.gif)
清华出版社系统仿真导论答案
Chapter6习题答案控制系统的MATLAB分析与设计
1.已知系统1
,系统2为
,
(1)求按串联、并联时的系统状态方程;
(2)系统1为前向通路,系统2为反馈通路,求正反馈、负反馈连接时的系统状态方程;(3)系统1按单位负反馈连接时的状态方程。
clc
clear
moreon
a1=[01;-1-2];
b1=[0;1];
c1=[13];d1=[1];
a2=[01;-1-3];
b2=[0;1];
c2=[14];d2=[0];
%串联连接
disp('串联连接')
[a,b,c,d]=series(a1,b1,c1,d1,a2,b2,c2,d2)
%并联连接
disp('并联连接')
[a,b,c,d]=parallel(a1,b1,c1,d1,a2,b2,c2,d2)
%正反馈
disp('正反馈连接')
[a,b,c,d]=feedback(a1,b1,c1,d1,a2,b2,c2,d2,+1)
%负反馈
disp('负反馈连接')
[a,b,c,d]=feedback(a1,b1,c1,d1,a2,b2,c2,d2)
%单位负反馈
disp('单位负反馈连接')
[a,b,c,d]=cloop(a1,b1,c1,d1)
2.已知晶闸管-直流电机单闭环调速系统的动态结构图如图所示,求该闭环系统的传递函数。
n1=1;d1=[0.0171];s1=tf(n1,d1);
n2=1;d2=[0.0750];s2=tf(n2,d2);
sys1=feedback(s1*s2,1)
n3=[0.0491];d3=[0.0880];s3=tf(n3,d3);
n4=44;d4=[0.001671];s4=tf(n4,d4);
n5=1;d5=0.1925;s5=tf(n5,d5);
n6=0.01178;d6=1;s6=tf(n6,d6);
sysq=sys1*s3*s4*s5;
sys=feedback(sysq,s6)
3.已知某典型二阶系统的传递函数为:
,
,求系统的阶跃响应曲线。
clc
clear
close
%系统传递函数描述
wn=5;
alfh=0.6;
num=wn^2;
den=[12*alfh*wnwn^2];
%绘制闭环系统的阶跃响应曲线
t=0:
0.02:
5;
y=step(num,den,t);
plot(t,y)
title('twoorderslinearsystemstepresponce')
xlabel('time-sec')
ylabel('y(t)')
gridon
4.已知系统的开环传递函数为:
,求系统在单位负反馈下的阶跃响应曲线。
clc
clear
closeall
%开环传递函数描述
num=[20];
den=[1836400];
%求闭环传递函数
[numc,denc]=cloop(num,den);
%绘制闭环系统的阶跃响应曲线
t=0:
0.1:
10;
y=step(numc,denc,t);
[y1,x,t1]=step(numc,denc);
%对于传递函数调用,状态变量x返回为空矩阵
plot(t,y,'r:
',t1,y1)
title('thestepresponce')
xlabel('time-sec')
%求稳态值
disp('系统稳态值dc为:
')
dc=dcgain(numc,denc)
5.已知系统的开环传递函数为:
,求系统在单位负反馈下的曲线。
clc
clear
close
%开环传递函数描述
numo=20;
deno=[1836400];
%求闭环传递函数
[numc,denc]=cloop(numo,deno,-1);
%绘制闭环系统的脉冲激励响应曲线
t=1:
0.1:
10;
[y,x]=impulse(numc,denc,t);
plot(t,y)
title('theimpulseresponce')
xlabel('time-sec')
6.某2输入2输出系统如下所示:
,求系统的单位阶跃响应和冲激响应。
clc
clear
close
%系统状态空间描述
a=[-2.5-1.2200;1.22000;1-1.14-3.2-2.56;...
002.560];
b=[41;20;20;00];
c=[0103;0001];
d=[0-2;-20];
%绘制闭环系统的阶跃响应曲线
figure
(1)
step(a,b,c,d)
title('stepresponse')
xlabel('time-sec')
ylabel('amplitude')
figure
(2)
impulse(a,b,c,d)
title('impulseresponse')
xlabel('time-sec')
ylabel('amplitude')
7.已知某典型二阶系统的传递函数为:
,
,求阻尼比
从0.1变化到1时时的波特图
%求典型二阶系统自然振荡频率固定,阻尼比变化时的波特图
clear
closeall
clc
wn=6;
kosi=[0.1:
0.05:
1.0];
%在对数空间上生成从10^(-1)到10^1共100个数据的横坐标
w=logspace(-1,1,100);
num=wn^2;
forkos=kosi
den=[12*kos*wnwn^2];
[mag,pha,w1]=bode(num,den,w);
%注意mag的单位不是分贝,若需要分贝表示
%可以通过20*log10(mag)进行转换
subplot(221);
holdon;
semilogx(w1,mag)
%注意在所绘制的图形窗口会发现x轴并没有取对数分度
subplot(222)
holdon;
semilogx(w,mag)
subplot(223);
holdon;
semilogx(w1,pha)
subplot(224)
holdon;
semilogx(w,pha)
end
subplot(221)
gridon
title('bodeplot')
xlabel('frequency(w)')
ylabel('amplitude')
text(6.2,5,'kosi=0.1')
text(2,0.5,'kosi=1.0')
subplot(223)
gridon
xlabel('frequency(w)')
ylabel('phasedeg')
text(5,-20,'kosi=0.1')
text(2,-85,'kosi=1.0')
holdoff
8.已知系统的开环传递函数为
,求当K分别取1300和5200时,系统的极坐标频率特性图。
clear
closeall
clc
k1=1300;
k2=5200;
w=8:
1:
80;
num1=k1;
num2=k2;
den=[1521000];
figure
(1)
subplot(211)
nyquist(num1,den,w);
subplot(212)
pzmap(num1,den);
figure
(2)
subplot(211)
nyquist(num2,den,w);
subplot(212)
[rm,im]=nyquist(num2,den);
plot(rm,im)
xlabel('real')
ylabel('image')
title('wfrom¸ºÎÞÇîtoÁã')
figure(3)
[numc,denc]=cloop(num2,den);
subplot(211)
step(numc,denc)
subplot(212)
[numc1,denc1]=cloop(num1,den);
step(numc1,denc1)
9.某系统的开环传递函数为:
,求k分别为2和20时的幅值裕度与相角裕度。
%margin函数通常用在bode函数之后,先由bode函数得到
%幅值、相角和频率矢量,然后由margin绘制出幅值裕度
%和相角裕度的波特图。
clear
clc
closeall
num1=2;num2=20;
den=conv([10],conv([11],[0.21]));
w=logspace(-1,2,100);
figure
(1)
[mag1,pha1]=bode(num1,den,w);
margin(mag1,pha1,w)
figure
(2)
[mag2,pha2]=bode(num2,den,w);
margin(mag2,pha2,w)
如图,幅值裕度为9.55dB,相角裕度25.4deg。
如图,幅值裕度为-10.5dB,相角裕度-23.6deg。
10.已知某系统的开环传递函数为:
,要求绘制系统的奈奎斯特曲线,判断闭环系统的稳定性,求出系统的单位阶跃响应。
clear
closeall
k=26;
z=[];
p=[-61];
[num,den]=zp2tf(z,p,k);
figure
(1)
subplot(211)
nyquist(num,den)
subplot(212)
pzmap(p,z)
figure
(2)
[numc,denc]=cloop(num,den);
step(numc,denc)
11.线性时不变系统如下所示:
要求绘制系统的波特图和奈奎斯特图,判断系统稳定性,如果系统稳定,求出系统稳定裕度,并绘制系统的单位冲激响应以验证判断结论。
clear
closeall
clc
%状态空间系统描述
a=[-0.6-1.0400;1.04000;00.96-0.7-0.32;
000.320];
b=[1000]';
c=[0000.32];
d=0;
%图1绘制波特图
figure
(1)
bode(a,b,c,d);
%图2绘制幅相曲线
figure
(2)
subplot(211)
nyquist(a,b,c,d);
[z,p,k]=ss2zp(a,b,c,d);
p
subplot(212)
[rm,im]=nyquist(a,b,c,d);
plot(rm,im)
%图3绘制带裕度及相应频率显示的波特图
figure(3)
margin(a,b,c,d);
%图4绘制冲激响应曲线
figure(4)
[ac,bc,cc,dc]=cloop(a,b,c,d);
impulse(ac,bc,cc,dc)
图1
图2
图3
图4
12.已知某单位反馈系统的开环传递函数为:
,要求:
绘制系统的闭环根轨迹,并确定使系统产生重实根和纯虚根的开环增益k。
clc
clear
closeall
%已知系统开环传递函数模型
num=1;
den=conv([0.0110],[0.021]);
rlocus(num,den)
[k1,p]=rlocfind(num,den)
[k2,p]=rlocfind(num,den)
title('rootlocus')
13.某开环系统传递函数为
,要求绘制系统的闭环根轨迹,分析其稳定性,并绘制出当k=55和k=56时系统的闭环冲激响应。
clc
clear
closeall
%已知系统传递函数模型
numo=[12];
den=[143];
deno=conv(den,den);
figure
(1)
k=0:
0.1:
150;
rlocus(numo,deno,k)
title('rootlocus')
[p,z]=pzmap(numo,deno);
%求出系统临界稳定增益
[k,p1]=rlocfind(numo,deno);
k
%验证系统的稳定性
figure
(2)
subplot(211)
k=55;
num2=k*[12];
den=[143];
den2=conv(den,den);
[numc,denc]=cloop(num2,den2,-1);
impulse(numc,denc)
title('impulseresponsek=55');
subplot(212)
k=56;
num3=k*[12];
den=[143];
den3=conv(den,den);
[numcc,dencc]=cloop(num3,den3,-1);
impulse(numcc,dencc)
title('impulseresponsek=56');
14.已知某系统的模型:
,要求判断系统的稳定性及系统是否为最小相位系统。
clear
clc
closeall
%系统描述
a=[12-12;2630;47-8-5;7216];
b=[-1001]';
c=[-2561];d=7;
%求系统的零极点
[z,p,k]=ss2zp(a,b,c,d)
%检验零点的实部;
%求取零点实部大于零的个数
ii=find(real(z)>0)
n1=length(ii);
%检验极点的实部;
%求取极点实部大于零的个数
jj=find(real(p)>0)
n2=length(jj);
%判断系统是否稳定
if(n2>0)
disp('thesystemisunstable')
disp('theunstablepoleare:
')
disp(p(jj))
else
disp('thesystemisstable')
end
%判断系统是否为最小相位系统
if(n1>0)
disp('thesystemisanonminimalphaseone')
else
disp('thesyetemisaminimalphaseone')
end
%绘制零极点图
pzmap(p,z)
15.已知高阶系统开环传递函数为:
,分别用pzmap和eig函数判断其闭环稳定性。
clc
num=[105010010040];
den=[1211848702384366424960];
G=tf(num,den);
G_Loop=feedback(G,1)
[p,z]=pzmap(G_Loop)
eig(G_Loop)'
p=
-6.9223
-3.6502+2.3020i
-3.6502-2.3020i
-2.0633+1.7923i
-2.0633-1.7923i
-2.6349
-0.0158