当前位置:网站首页>Simulink的Variant Model和Variant Subsystem用法
Simulink的Variant Model和Variant Subsystem用法
2022-06-13 08:53:00 【mydate()】
文章目录
一、Variant Model和Subsystem的作用
1、Variant Model和Variant Subsystem作用类似于状态机,根据不同的状态值会执行不同的程序或者模块;
Variant Model用于调用不同的.Slx的模块,根据不同的状态值,执行不同的模块;
Variant Subsystem是直接在内部编写程序,根据不同的状态值,执行不同的程序;
二、Variant Model的使用方法
1、在Simulink界面创建不同的.Slx模块
2、在Simulink界面插入Variant Model
3、配置对应Variant Model的Slx模块路径
1)依次双击进入下列的三个模块,配置需要被调用的.Slx模块的路径;
2)配置完成后的效果
4、配置对应Variant Model的状态值
1)右键Variant Model选择Block Parameters (Subsystem),添加对应的状态值;
2)配置不同的Slx模块的 Variant control expression,当K值为1时,则执行VDM1(Model,单击模块时可以修改名称),否则执行其他模块;
5、运行Simulink
1)Matlab对K进行赋值,给K赋不同的状态值时会高亮不同的模块;
2)运行Simulink
三、Variant Subsystem的使用方法
1、在Simulink界面插入Variant Subsystem
2、进入Variant Subsystem并编辑程序
Subsystem:
Subsystem1:
Subsystem2:
3、配置Variant Subsystem
1)右键Variant Subsystem选择Block Parameters (Subsystem),添加对应的状态值;
- 配置不同Subsystem的 Variant control expression,当K值为1时,则执行Subsystem,否则执行其他;**
4、运行Simulink
综上完成Variant Model和Variant Subsystem的使用介绍;
边栏推荐
- 国债逆回购能开户吗,国债逆回购在APP上可以直接开通券商安全吗 ,买股票怎么网上开户
- 关于RSA加密解密原理
- Map 23 summary
- ES6 use of dynamic attributes
- Pop component submission success failure animation
- Review one flex knowledge point every day
- Brief description of software testing and software maintenance
- Browser render passes
- About RSA encryption and decryption principle
- 【网络安全渗透】如果你还不懂CSRF?这一篇让你彻底掌握
猜你喜欢
redis
Container concept and cloud native
DIY UAV (anonymous controller p2+f330 rack)
torch. How to calculate addmm (m, mat1, mat2)
Browser render passes
【网络安全】SQL注入新思维之webshell提权
如何成为白帽子黑客?我建议你从这几个阶段开始学习
Basic use of cesium, including loading images, terrain, models, vector data, etc
關於RSA加密解密原理
Cesium achieves sunny, rainy, foggy, snowy and other effects
随机推荐
WARNING:tornado. access:404 GET /favicon. ICO (172.16.8.1) 1.84ms [with static file settings]
On the use of regular expressions (bracket problem)
pytorch相同结构不同参数名模型加载权重
GBase 8a V95与V86压缩策略类比
如何成为白帽子黑客?我建议你从这几个阶段开始学习
\Difference between N and \r
1、 JS introduction
[pychart pit stepping record] prompt after configuring remote operation, [errno 2] no such file or directory
你不知道的stringstream的用法
Knowledge points related to system architecture 3
useRoutes() may be used only in the context of a <Router> component.
【QNX Hypervisor 2.2 用户手册】4.5.1 构建QNX Guest
4、 Js-es5-i / O
1. preliminary understanding of Express
GBase 8a磁盤問題及處理
I set up a blog
How to save the video of wechat video number locally?
Differences and uses among cookies, localstorage, sessionstorage, and application caching
[leetcode weekly race record] record of the 80th biweekly race
JS to get the date in the next seven days of the current date