现代控制实验报告.doc

上传人:wux****ua 文档编号:9087318 上传时间:2020-04-03 格式:DOC 页数:16 大小:415.50KB
返回 下载 相关 举报
现代控制实验报告.doc_第1页
第1页 / 共16页
现代控制实验报告.doc_第2页
第2页 / 共16页
现代控制实验报告.doc_第3页
第3页 / 共16页
点击查看更多>>
资源描述
实验1 利用MATLAB进行传递函数和状态空间模型间的转换例1.1代码:A=0 1 0;0 0 1;-5 -25 -5;B=0;25;-120;C=1 0 0;D=0;num,den=ss2tf(A,B,C,D)结果:num =0 0.0000 25.0000 5.0000den =1.0000 5.0000 25.0000 5.0000例1.2代码:A=0 1;-25 -4;B=1 1;0 1;C=1 0;0 1;D=0 0;0 0;num1,den1=ss2tf(A,B,C,D,1)num2,den2=ss2tf(A,B,C,D,2)结果:num1 = 0 1.0000 4.0000 0 0 -25.0000den1 = 1.0000 4.0000 25.0000num2 = 0 1.0000 5.0000 0 1.0000 -25.0000den2 =1.0000 4.0000 25.0000例1.3代码:num=0 0 10 10;den=1 6 5 10;A,B,C,D=tf2ss(num,den)结果:A = -6 -5 -10 1 0 0 0 1 0B = 1 0 0C = 0 10 10D =0实验要求代码:num=0 0 1 2;0 1 5 3den=1 2 3 4;A,B,C,D=tf2ss(num,den)结果:A = -2 -3 -4 1 0 0 0 1 0B = 1 0 0C = 0 1 2 1 5 3D = 0 0实验2 利用MATLAB对状态空间模型进行分析例2.1代码:A=0 1;-10 -5;B=0;0;D=B;C=1 0;0 1;x0=2;1;y,x,t=initial(A,B,C,D,x0);plot(t,x(:,1),t,x(:,2)gridtitle(Response to Initial Condition)xlabel(Time (sec)ylabel(x1,x2)text(0.55,1.15,x1)text(0.4,-2.9,x2)图形:例2.2代码:A=-1 -1;6.5 0;B=1 1;1 0;C=1 0;0 1;D=0 0;0 0;step(A,B,C,D)图形:例2.3代码:A=0 -2;1 -3;B=2;0;C=1 0;D=0;sys=ss(A,B,C,D);x0=1;1;t=0:0.01:20;u=cos(t);y,T,x=lsim(sys,u,t,x0);subplot(2,1,1),plot(T,x(:,1)xlabel(Time(sec),ylabel(X_1)subplot(2,1,2),plot(T,x(:,2)xlabel(Time(sec),ylabel(X_2)图形:实验要求代码:A=0 1;-1 0; B=0;0; D=B; C=1 0;0 1; x0=0;1; y,x,t=initial(A,B,C,D,x0); plot(t,x(:,1),t,x(:,2) grid title(Response to Initial Condition) xlabel(Time (sec) ylabel(x1, x2) text(0.55,1.15,x1) text(0.4,-2.9,x2)图形:实验3 利用MATLAB导出连续状态空间模型的离散化模型例3.1代码:A=0 1;-25 -4; B=0;1; G,H=c2d(A,B,0.05)结果:G = 0.9709 0.0448 -1.1212 0.7915H = 0.00120.0448实验要求T=1时的代码:A=-1 0;0 -2; B=0;1; G,H=c2d(A,B,1)结果:G = 0.3679 0 0 0.1353H = 00.4323T=0.5时的代码:A=-1 0;0 -2; B=0;1; G,H=c2d(A,B,0.5)结果:G = 0.6065 0 0 0.3679H = 0 0.3161实验4 利用MATLAB求解极点配置问题例4.1代码:A=0 1 0;0 0 1;-1 -5 -6; B=0;0;1; J=-2+j*4 -2-j*4 -10; K=acker(A,B,J)结果: K = 199 55 8代码:A=0 1 0;0 0 1;-1 -5 -6; B=0;0;1; J=-2+j*4 -2-j*4 -10; K=place(A,B,J); sys=ss(A-B*K,0;0;0,eye(3),0); t=0:0.01:4; x=initial(sys,1;0;0,t); x1=1 0 0*x; x2=0 1 0*x; x3=0 0 1*x; subplot(3,1,1);plot(t,x1),grid title(Response to Initial Condition) ylabel(x1) subplot(3,1,2);plot(t,x2),grid ylabel(x2) subplot(3,1,3);plot(t,x3),grid xlabel(t (sec) ylabel(x3)图形:实验要求:求K:A=0 1;-3 -4; B=0;1; J=-4 -5; K=acker(A,B,J)结果:K = 17 5配置极点前:A=0 1;-3 -4;B=0;1;C=3 2;D=0;step(A,B,C,D)单位阶跃响应:配置极点后:A=0 1;-20 -9;B=0;1;C=3 2;D=0;step(A,B,C,D)单位阶跃响应:分析:系统动态性能变好,但是稳态误差变大。实验5 利用MATLAB设计状态观测器例5.1求L:a=0 1 0;0 0 1;1.244 0.3965 -3.145;b=0;0;1.244; c=1 0 0; v=-5+j*5*sqrt(3) -5-j*5*sqrt(3) -10; l=(acker(a,c,v)结果:l = 16.8550 147.3875 544.3932实验要求:求K:a=0 1 ;0 -2;b=0;1; J=-2+j*2*sqrt(3) -2-j*2*sqrt(3); K=acker(a,b,J)得:K = 16.0000 2.0000求L:a=0 1 ;0 -2;b=0;1; c=4 0; v=-8 -8; l=(acker(a,c,v)得:l = 14 36求响应代码:A=0 1;0 -2;B=0;1;C=4 0;D=0;K=16 2;L=3.5;9;AA=A-B*K B*K;zeros(2,2) A-L*C;sys=ss(AA,eye(4),eye(4),eye(4);t=0:0.01:3;x=initial(sys,1;0;1;0,t);x1=1 0 0 0*x; x2=0 1 0 0*x;e1=0 0 1 0*x; e2=0 0 0 1*x;subplot(2,2,1);plot(t,x1),grid title(Response to Initial Condition) ylabel(x1) subplot(2,2,2);plot(t,x2),grid title(Response to Initial Condition)ylabel(x2) subplot(2,2,3);plot(t,e1),grid title(Response to Initial Condition) ylabel(e1) subplot(2,2,4);plot(t,e2),grid title(Response to Initial Condition)ylabel(e2) xlabel(t (sec)或:A=0 1;0 -2;B=0;1;C=4 0;D=0;K=16 2;L=3.5;9;AA=A-B*K B*K;zeros(2,2) A-L*C;sys=ss(AA,0;1;0;0,1 1 1 1,D);t=0:0.01:3;u=0;y,t,x=initial(sys,1;0;1;0,t);subplot(2,2,1);plot(t,x(:,1),grid title(Response to Initial Condition) ylabel(x1) subplot(2,2,2);plot(t,x(:,2),grid title(Response to Initial Condition)ylabel(x2) subplot(2,2,3);plot(t,x(:,3),grid title(Response to Initial Condition) ylabel(e1) subplot(2,2,4);plot(t,x(:,4),grid title(Response to Initial Condition)ylabel(e2) xlabel(t (sec)结果:
展开阅读全文
相关资源
相关搜索

当前位置:首页 > 管理文书 > 工作总结


copyright@ 2023-2025  zhuangpeitu.com 装配图网版权所有   联系电话:18123376007

备案号:ICP2024067431-1 川公网安备51140202000466号


本站为文档C2C交易模式,即用户上传的文档直接被用户下载,本站只是中间服务平台,本站所有文档下载所得的收益归上传人(含作者)所有。装配图网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。若文档所含内容侵犯了您的版权或隐私,请立即通知装配图网,我们立即给予删除!