当前位置:网站首页>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的使用介绍;
边栏推荐
- GBase 常见网络问题及排查方法
- Pytorch model tuning - only some layers of the pre training model are loaded
- Print an array clockwise
- Jfinal and swagger integration
- transforms. ColorJitter(0.3, 0, 0, 0)
- Paging query template of Oracle
- JS format file unit display
- GBase 8a磁盘问题及处理
- Onnx crop intermediate node
- Cesium achieves sunny, rainy, foggy, snowy and other effects
猜你喜欢
torch. How to calculate addmm (m, mat1, mat2)
Docker installing MySQL local remote connection docker container MySQL
Centering problem - the width and height of child elements are known
Basic use of cesium, including loading images, terrain, models, vector data, etc
redis
网络安全漏洞分析之重定向漏洞分析
Onnx crop intermediate node
【安全】零基础如何从0到1逆袭成为安全工程师
Use of addeventlistener in JS
1. Learning sequence of SolidWorks modules
随机推荐
消息中间件
2020-12-28
5、 Constant, variable
The 360 mobile assistant on Huawei maimang 7 cannot be uninstalled
Differences and uses among cookies, localstorage, sessionstorage, and application caching
13.inline,const,mutable,this,static
關於RSA加密解密原理
0.一些自己初學Solidworks的疑惑
【网络安全渗透】如果你还不懂CSRF?这一篇让你彻底掌握
Opencv gaussianblur() explanation (Sigma value)
An error CV2 is reported when the picture is converted to grayscale cvtColor(img, cv2.COLOR_BGR2GRAY)
ADT Google browser plug-in ad Terminator
JS to get the date in the next seven days of the current date
JS gets the first month of the year, the second month to the last month, and the first day to the last day
1.SolidWorks各模块的学习顺序
Problems in the deconstruction and assignment of objects, comparison between empty strings and undefined
Gbase 8A v95 vs v86 compression strategy analogy
You don't know the usage of stringstream
Vscode double shortcut keys up, down, left and right
centos 安装mysql及设置远程访问