- 2
- 0
- 约7.66千字
- 约 6页
- 2016-10-16 发布于贵州
- 举报
控制系统的MALAB仿真与设计第七章
7.1
7.2
7.3
7.4
7.5
7.6
7.7
function [sys,x0,str,ts]=ww(t,x,u,flag)
%定义连续系统的S函数
A=[0,1;-0.4,-0.2];
B=[0;0.2];
C=[1,0];
D=0;
switch flag,
case 0,
[sys,x0,str,ts]=mdlInitializeSizes(A,B,C,D);
case 1,
sys=mdlDerivatives(t,x,u,A,B,C,D);
case 2,
sys=mdlUpdate(t,x,u);
case 3,
sys=mdlOutputs(t,x,u,A,B,C,D);
case 4,
sys=mdlGetTimeOfNextVarHit(t,x,u);
case 9,
sys=mdlTerminate(t,x,u);
otherwise
error([Unhandled flag = ,num2str(flag)]);
end
%=============================================================================
function [sys,x0,str,ts]=mdlInitializeSizes(A,B,C,D)
sizes = simsizes;
sizes.NumContStates = 2;
sizes.NumDiscStates = 0;
sizes.NumOutputs = 1;
sizes.NumInputs = 1;
sizes.DirFeedthrough = 1;
sizes.NumSampleTimes = 1;
sys = simsizes(sizes);
x0 = [0;0];
str = [];
ts = [0 0];
%=============================================================================
function sys=mdlDerivatives(t,x,u,A,B,C,D)
sys = A*x+B*u;
%=============================================================================
function sys=mdlUpdate(t,x,u)
sys = [];
%=============================================================================
function sys=mdlOutputs(t,x,u,A,B,C,D)
sys = C*x+D*u;
%=============================================================================
function sys=mdlGetTimeOfNextVarHit(t,x,u)
sampleTime = 1;
sys = t + sampleTime;
%=============================================================================
function sys=mdlTerminate(t,x,u)
sys = [];
spacing of 100mm. C, line line line nearby. D, spare wire unified terminal strip Terminal (terminal strip at the top of the vertical, horizontal terminal strip from the harness to Terminal Pai end at the beginning), length to ensure as far as Terminal and set aside. After e, form a wire harness, cable, line. When the line should be in the core wire for better identification and marking on the cards will be prepared in advance, alternate core core content for
您可能关注的文档
- 手把手教你利用机蓝牙联接小Y.doc
- 所有交通标志图大全.doc
- 房屋租赁租金报估价系统论文.doc
- 手把手教你用手的GPRS连接电脑上网.docx
- 手术部位感染目性监测.doc
- 手把手教你设置域网电脑共享--局域网共享设置教程 (图文).doc
- 打击无证行医专行动工作总结.doc
- 手机视频格式全转换图文教程.doc
- 打字练习:汉字分(五笔).doc
- 执业医师操作考内容.doc
- 山西天一大联考2025-2026学年高二上学期期末学情监测语文试题(试卷+解析).docx
- 山西忻州部分学校2025-2026学年高一上学期2月质量检测数学试题(人教B版)(试卷+解析).docx
- 山西运城市2025-2026学年高二第一学期期末调研测试数学试题(试卷+解析).docx
- 陕西省榆林市榆阳区2025-2026学年八年级上学期期末地理试题(试卷+解析).docx
- 陕西西安市碑林区2025-2026学年度第一学期期末八年级生物试题(试卷+解析).docx
- 四川省广元市苍溪县2025-2026年八年级上学期期末道德与法治试题(试卷+解析).docx
- 江苏泰州市姜堰区2025-2026学年七年级上学期1月期末数学试题(试卷+解析).docx
- 江苏省扬州市邗江区2025-2026学年九年级上学期期末考试化学试题(试卷+解析).docx
- 江西上饶市铅山县2025-2026学年第一学期期末考试八年级数学试题(试卷+解析).docx
- 江苏扬州市高邮市2025-2026学年度第一学期期末学业质量监测试题九年级英语(试卷+解析).docx
原创力文档

文档评论(0)