文档详情

从问题到程序--裘宗燕--课后习题部分答案(第十一章).doc

发布:2018-02-17约1.14千字共3页下载文档
文本预览下载声明
第11章习题答案 1.熟悉Simulink的模块库,掌握常用模块(Commonly used Blocks) 参考答案:略。 2. 求解微分方程,初始条件。 参考答案:Simulink中的连线图如下 求解出的,,的解如下 从上到下的三条曲线分别对应的是,,的解。 3. 使用S函数实现y=5*x+3,建立仿真模型并得出仿真结果。 参考答案:S函数的代码如下 function [sys,x0,str,ts] = sfuntmpl(t,x,u,flag) switch flag, case 0, [sys,x0,str,ts]=mdlInitializeSizes; case 3, sys=mdlOutputs(t,x,u); case {1,2,4,9}, sys=[]; otherwise error([Unhandled flag = ,num2str(flag)]); end function [sys,x0,str,ts]=mdlInitializeSizes sizes = simsizes; sizes.NumContStates = 0; sizes.NumDiscStates = 0; sizes.NumOutputs = -1; sizes.NumInputs = -1; sizes.DirFeedthrough = 1; sizes.NumSampleTimes = 1; sys = simsizes(sizes); x0 = []; str = []; ts = [-1 0]; function sys=mdlOutputs(t,x,u) sys = 5*x+3; 4. 在水平角度30(方向,以100 m/s的速度来投掷一个抛射物建立一个Simulink模型抛射物方程其中x和y分别是这个抛射物 = 0    x(0) = 0   (0) = 100 cos 30? = -g   y(0) = 0   (0) = 100 sin 30? 使用模型抛射物y相对于x的图形,其中,0≤t≤10 s。 参考答案:略。 5. 考虑图系统方程 m1 + (c1 + c2) + (k1 + k2)x1 - c2 - k2x2 = 0 m2+ c2 + k2x2 - c2 - k2x1 = f (t) 假设m1 = m2 = 1, c1 = 3, c2 = 1, k1 = 1k2 = 4。 (1). 开发这个系统的Simulink模型使用模型状态-变量传递-函数 使用Simulink模型以下输入响应x1(t)初始条件 f (t) = 参考答案:略。
显示全部
相似文档