- 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 4、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 5、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 6、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 7、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
My Note for Matlab-Simulink
Hydraulic Simulation Using Simulink1. Simulink- S-PS and PS-S Converter (1) S-PS converter It’s function is converting simulink (S) signal into physical (P) signal.(2) PS-S converter It has the opposite function to S-PS.You can look at the following diagram.2. A simple symbol ” ~=” means unequal.3. Switch block (signal routing) The switch block passes through the first input or the third input based on the value of the second input. The first and third inputs are called data inputs. The second input is called control input. Specify the condition under which the block passed the first input by using the criteria for passing first input and threshold parameters. Select the condition under which the block passes the first input. If the control input meets the condition set in the criteria for passing first input parameter, the block passes the first input. Otherwise, the block passes the third input.?自己的对switch模块的理解:(1)中间端口(port 2)是判定,另外两个端口(port1 and port 3)是输入。(2)在模块设置中选择判定条件(数据输入):①默认选择是u= threshold,可以设定门限值。如果设定门限值为0,然后判断port 2的输入与0的大小关系,若port 2=0,则输出port 1的输入;若port 20,则输出port 3的输入。②如果选择判断条件为u threshold,结果类似。③如果选择判断条件为u ~= 0(意思是非零),若port 2非零,则输出port 1的输入;若port 2为零,则输出port 3的输出。(3)若port 2输入是布尔运算输入(Boolean control input):①若port 2的布尔运算结果为1,则输出port 1的输入;②若port 2的布尔运算结果为0,则输出port 3的输入。(4)Example下面举个例子,将一个简单的判断语句用switch模块来表示。If a1b=3;else b=5;end4. Connection of Simulink and Matlab(1)由Matlab工作空间变量设置Simulimk模块参数:一般情况下可以通过打开模块参数设置对话框来设置参数,但是当参数比较多时,就比较麻烦了。如果各个参数有一定的函数关系,那么就更适合这种方法了。具体过程如下:A. 将模块中的参数用字母表示,比如k,然后其他的参数写成关于k的函数;B. 在工作空间中给定k一个值,那么模块就会自动从工作空间中读取参数的值。Example:(2)将信号输出到Matlab工作空间中:一般是使用scope示波器显示输出结果,但这只能定性的分析输出结果,要想定量的分析且希望把几组结果画在同一张图中进行比较,就需要(三种方法:a. 使用To Workspace模块; b. 在示波器模块设置中将数据输出到工作空间; c. 使用Simulink Configuration Parameter 对话框中的Data import and export)先将数据输出到工作空间中,然后再进行数据处理(我习惯于用Origin进行数据分析和画图)。Example:(3)使用Matlab工作空间变量作为系统的输入信号:使用From Workspace模块可以将Matlab工作空间中的变量作为Simulink系统仿真模块的输入信号。Example:t=[0 3 6 9 10];x=[-1 1 -1 1 1/3];input=[t’,
文档评论(0)