《控制系统计算机辅助设计:MATLAB语言与应用(第2版)》薛定宇_课后习题答案.pdf
《《控制系统计算机辅助设计:MATLAB语言与应用(第2版)》薛定宇_课后习题答案.pdf》由会员分享,可在线阅读,更多相关《《控制系统计算机辅助设计:MATLAB语言与应用(第2版)》薛定宇_课后习题答案.pdf(68页珍藏版)》请在淘文阁 - 分享文档赚钱的网站上搜索。
1、第1章控制系统计算机辅助设计概述第2章MATLAB语言程序设计基础第3章线性控制系统的数学模型第4章线性控制系统的计算机辅助分析第5章Simulink在系统仿真中的应用第6章控制系统计算机辅助设计第 1 章控制系统计算机辅助设计概述1 国,除 黎 我 编 I 音店一 R现 历 顼I登录,MathWbrks,产 品 到 牍 IE决方富 收育 支持 用户中心 融 公司7*t+H S MATLAB K W 子慢2缈 出+或件 Sim ulink的相关产品.特 色 心Porallcl Computing ToolboxData Acquisition ToolboxInstmment Control
2、ToolboxBioinformatics ToolboxSimscpHDLCcjder新发生R2012aMATLAB,Simulink和真白84冷产品的相关更M/VT1ABI M obje-已阅,略2 MATLAB DEMOSUATLAMis a high-level language and interactve environment that enatMesyou to perfonn computabonalty intensNe tasks faster than wit traworks com QGetting StartedGeang Suited wttfi MATLAB(
3、5 mm.18 sc)Woidng in The DevelopmentEnvwonmtnt(4 min 7 c)VideoWntng a MATLAB Program(5 min.45sec)己阅,略3 已经掌握help命令和Help菜单的使用方法4 区别:MATLAB语言实现矩阵的运算非常简单迅速,且效率很高,而用其他通用语言则不然,很多通用语言所实现的矩阵运算都是对矩阵维数具有一点限制的,即使限制稍小的,但凡维数过大,就会造成运算上的溢出出借或者运算出错,甚至无法处理数据的负面结果5 tic?A=rand(550);B=inv(A);tocElapsed time is 0.071709
4、 seconds.norm(A*B),norm(B*A)ans=ans=1.0000 1.0000 tic,A=rand(1550);B=inv(A);tocElapsed time is 1.181967 seconds.norm(A*B),norm(B*A)ans=ans=1.0000 norm(A*B-eye(550)ans=1.2892e-0111.0000 norm(A*B-eye(1550)ans=9.8862e-0108(2)输入激励为脉冲模拟信号输入激励为时钟信号(4)输入激励为随机信号(5)输入激励为阶跃信号6=0.3。76=0.056=0.7结论:随着非线性环节的死区增大,
5、阶跃响应曲线的范围逐渐被压缩,可以想象当死区6足够大时,将不再会有任何响应产生。所以可以得到结论,在该非线性系统中,死区的大小可以改变阶跃响应的幅值和超调量。死区越大,幅值、超调量将越小,而调整时间几乎不受其影响第 2 章 MATLAB语言程序设计基础1 A=l 2 3 4;4 3 2 1;2 3 4 1;3 2 41A=12 3 44 3 2 12 3 4 13 2 4 1 B=l+4i,2+3i,3+2i,4+i;4+i,3+2i,2+3i,l+4i;2+3i,3+2i,4+i,l+4i;3+2i,2+3i,4+i,l+4iB=1.0000+4.0000i4.0000+l.OOOOi2.0
6、000+3.0000i3.0000+2.0000i2.0000+3.0000i3.0000+2.0000i3.0000+2.0000i2.0000+3.0000i3.0000+2.000012.0000+3.0000i4.0000+l.OOOOi4.0000+l.OOOOi4.0000+l.OOOOi1.0000+4.0000i1.0000+4.000011.0000+4.0000i A(5,6)=5A=123400432100234100324100000005若给出命令A(5,6)=5则矩阵A的第5行6列将会赋值为5,且其余空出部分均补上0作为新的矩阵A,此时其阶数为5x62 相应的 MA
7、TLAB 命令:B=A(2:2:end,:)A=magic(8)A=从上面的运行结果可以看出,该命令的结果是正确的64236160675795554121351501617474620214342244026273736303133323435292838392541232244451918484915145253111056858595462631 B=A(2:2:end,:)B=955541213515016402627373630313341232244451918488585954626313 syms x s;f=xA5+3*xA4+4*xA3+2*xA2+3*x+6xA5+3*xA
8、4+4*xA3+2*xA2+3*x+6 fl,m=simple(subs(f,x,(s-l)/(s+l)fl=19-(72*sA4+120*sA3+136*sA2+72*s+16)/(s+1)A5m=simplify(lOO)4 i=0:63;s=sum(2.Asym(i)s=184467440737095516155 fo r i=l:120if(j=l|i=2)a(i)=l;else a(i)=a(i-l)+a(i-2);endif(i=120)a=sym(a);disp(a);endend1,1,2,3,5,&13,21,34,55,89,144,233,377,610,987,1597
9、,2584,4181,6765,10946,17711,28657,46368,75025,121393,196418,317811,514229,832040,1346269,2178309,3524578,5702887,9227465,14930352,24157817,39088169,63245986,102334155,165580141,267914296,433494437,701408733,1134903170,1836311903,2971215073,480乃26976,7778742049,12586269025,20365011074,32951280099,533
10、16291173,86267571272,139583862445,225851433717,365435296162,591286729879,956722026041,1548008755920,2504730781961,4052739537881,6557470319842,10610209857723,17167680177565,27777890035288,44945570212853,72723460248141,117669030460994,190392490709135,308061521170129,2111485077978050,14472334024676221,
11、99194853094755497,498454011879264,3416454622906707,23416728348467685,160500643816367088,806515533049393,5527939700884757,37889062373143906,259695496911122585,1304969544928657,8944394323791464,61305790721611591,420196140727489673,679891637638612258,1100087778366101931,1779979416004714189,288006719437
12、0816120J4660046610375530309,19740274219868223167,83621143489848422977,354224848179261915075,1500520536206896083277,6356306993006846248183,26925748508234281076009,114059301025943970552219,483162952612010163284885,7540113804746346429,31940434634990099905,135301852344706746049,573147844013817084101,242
13、7893228399975082453,10284720757613717413913,43566776258854844738105,184551825793033096366333,781774079430987230203437,12200160415121876738,51680708854858323072,218922995834555169026,927372692193078999176,3928413764606871165730,16641027750620563662096,70492524767089125814114,298611126818977066918552,
14、1264937032042997393488322,2046711111473984623691759,3311648143516982017180081,53583592549909666408718406 k=l;for i=2:1000for j=2:iif rem(i,j)=0if jD)+(h.*x/D).*(abs(x)=D)-h.*(xl,errorC出错:输出变量个数过多!1);endif k=0,error(,出错:输入序列应为正整数!,);endif k=l|k=2/y=l;else y=fib(k-l)+fib(k-2);endend13123-5-6 8-9-10 11
15、-12-13-14-15 16 一17-18-19-20-%根据初始角度初始化正三角形%并能根据步距在同一坐标系下绘制出绕其中心旋转后得到的一系列三角形t=0:p i/18 0:2*p ix=s i n(t):y=c o s(t):p l o t (x,%一.):a x i s e q u a l;h o l d o n;s=i n p u t (设置旋转步距:);-i n p u t (设置初始角度:):t=t*p i/18 0:%角度弧度转换E f o r i=0:2*p i/s:2*p ii f i=0,%定位初始角度,以定位首正三角形p l o t (c o s(t),0 ,s i n
16、(t),0 ,:p l o t (0,1,0,0 /):e n dp l o t (c o s (t+i),c o s (t+2*p i/3+i)s i n(t+i),s i n(t+2*p i/3+i);p l|o t (c o s (t+2*p i/3+i),c o s (t+4*p i/3+i),s i n(t+2*p i/3+i),s i n(t+4*p i/3+i):p l o t (c o s (t+4*p i/3+i),c o s (t+i),s i n(t+4*p i/3+i),s i n(t+i);e n d设置旋转步距:5设置初始角度:3014 t=-l:0.001:-0.
17、2,-0.1999:0.0001:0.1999,0.2:0.001:1;y=sin(l./t);Plot(t,y);grid on;15(1)t=-2*pi:0.01:2*pi;r=1.0013*t.A2;polar(t,r);axis(square)9 0 40270(2)t=-2*pi:0.001:2*pi;r=cos(7*t/2);polarftjJjaxisCsquare)t=-2*pi:0.001:2*pi;r=sin(t)./t;polar(tzr);axis(square)180t=-2*pi:0.001:2*pi;r=l-cos(7*t).A3;polarftjJjaxisCs
18、quare)90 13.80.60.4270门7】(l)z=xyx/y=meshgrid(-3:0.01:3/-3:0.01:3);z=x.*y;(l)z=sin(xy)x,y=meshgrid(-3:0.01:3,-3:0.01:3);z=sin(x.*y);mesh(x,y,z);contour3(x,y,z,50);第 3 章线性控制系统的数学模型1(1)s=tf(s);G=(sA2+5*s+6)/(s+l)A2+l)*(s+2)*(s+4)Transfer function:s八 2+5 s+6sA4+8 sA3+22 sA2+28 s+16(2)z=tf(zO.l);H=5*(z-0
19、.2)A?/(z*(z-0.4)*(z-l)*(z-0.9)+0.6)Transfer function:5 zA2-2 z+0.2zA4-2.3 zA3+1.66 zA2-0.36 z+0.6Sampling time(seconds):0.12 该方程的数学模型 num=6 4 2 2;den=l 10 32 32;G=tf(num,den)Transfer function:6 sA3+4 sA2+2 s+2sA3+10 s八 2+32 s+32(2)该模型的零极点模型 G=zpk(G)Zero/pole/gain:6(s+0.7839)(sA2-0.1172s+0.4252)(s+4)
20、八 2(s+2)由微分方程模型可以直接写出系统的传递函数模型5(1)P=0;0;-5;-6;-i;i;Z=-l+i;-l-i;G=zpk 亿,R8)Zero/pole/gain:8(sA2+2s+2)sA2(s+5)(s+6)(sA2+1)(2)P=0;0;0;0;0;8.2;Z=-3.2;-2.6;H=zpk(Z/B l,,Ts/0.05,Variable/q,)Zero/pole/gain:(q+3.2)(q+2.6)q八5(q-8.2)Sampling time(seconds):0.058 闭环系统的传递函数模型s=tf(s);G=10/(s+l)A3;Gpid=0.48*(l+l/(
21、1.814*s)+0.4353*s/(l+0.4353*s);Gl=feedback(Gpid*G,l)Transfer function:7.58 sA2+10.8 s+4.80.7896 sA5+4.183 sA4+7.811 sA3+13.81 sA2+12.61 s+4.8状态方程的标准型实现G l=ss(G l)a=x5 0 xlx2x3x4x5xl-5.297-2.473-2.186-0.9981-0.7598x240000 x302000 x400200 x50000.50b=ulxl 2x2 0 x3 0 x4 0c=xl x2 x3 x4 x5yl 0 0 0.6 0.427
22、3 0.3799d=ulyl 0Continuous-time state-space model.(3)零极点模型Gl=zpk(Gl)Zero/pole/gain:9.6(sA2+1.424s+0.6332)(s+3.591)(sA2+1.398s+0.6254)(sA2+0.309s+2.707)11 Ga=feedback(s/(sA2+2)*l/(s+l),(4*s+2)/(s+l)A2);Gb=feedback(l/sA2,50);G=3*feedback(Gb*Ga,(sA2+2)/(sA3+14)Transfer function:3 sA6+6 sA5+3 sA4+42 sA3
23、+84 sA2+42 ssA10+3 sA9+55 sA8+175sA7+300sA6+1323 sA5+2656sA4+3715sA3+7732sA2+5602s+140013cl=feedback(G5*G4,H3)=G5*G4/(l+G5*G4*H3)c2=feedback(G3,H4*G4)=GV(l+G3*H4*G4)c3=feedback(c2*G2,H2)=c2*G2(l+c2*G2*H2)=G3*GZ(l+G3*H4*G4+G3*G2*Hl)G=feedback(G6*cl*c3*Gl,Hl)=G6*cl*c3*GV(l+G6*cl*c3*Gl*Hl)=G6*G5*G4*G3*
24、G2*G1/(1+G3*H4*G4+G3*G2*H1+G5*G4*H3+G5*G4*H3*G3*H4*G4+G5*G4*H3*G3*G2*H1+G6*G5*G4*G3*G2*G1*H1)14 s=tf(s);cl=feedback(0.21/(l+0.15*s)z0.212*130/s);c2=feedback(cl*70/(l+0.0067*s)*(l+0.15*s)/(0.051*s)z0.1/(l+0.01*s);G=(V(l+0.01*s)*feedback(130/s*c2*V(l+0.01*s)*(l+0.17*s)/(0.085*s),0.0044/(l+0.01*s)Trans
25、fer function:0.004873 sA5+1.036 sA4+61.15 sA3+649.7 sA2+1911 s4.357e-014 sA10+2.422e-011 sA9+5.376e-009 sA8+6.188e-007 sA7+4.008e-005 sA6+0.001496 sA5+0.03256 sA4+0.4191 sA3+2.859 sA2+8.408 s第4章线性控制系统的计算机辅助分析1(1)num=l;den=3 2 1 2;G=tf(num,den);eig(G)ans=-1.00000.1667+0.7993i0.1667-0.7993i分析:由以上信息可知,
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 控制系统计算机辅助设计:MATLAB语言与应用第2版 控制 系统 计算机辅助设计 MATLAB 语言 应用 薛定宇 课后 习题 答案
限制150内