没有合适的资源?快使用搜索试试~ 我知道了~
首页FMI-TOOLBOX用户手册
资源详情
资源评论
资源推荐
FMI Toolbox User's Guide 2.6.4
FMI Toolbox User's Guide 2.6.4
Publication date 2018-07-23
Copyright © 2018 Modelon AB
Ideon Science Park
SE-22370 LUND
<info@modelon.com>
Self publishing
ALL RIGHTS RESERVED. This document contains material protected under International Copyright Laws and Treaties. Any unauthorized
reprint or use of this material is prohibited. No part of this document may be reproduced or transmitted in any form or by any means, electronic
or mechanical, including photocopying, or by any information storage and retrieval system without express written permission from the author /
publisher.
iii
Table of Contents
1. Introduction .............................................................................................................................. 1
1.1. The FMI Toolbox for MATLAB/Simulink ........................................................................... 1
1.2. The Functional Mock-up Interface ...................................................................................... 1
2. Installation ................................................................................................................................ 3
2.1. Supported platforms ......................................................................................................... 3
2.2. Prerequisites ................................................................................................................... 3
2.2.1. MATLAB/Simulink ............................................................................................... 3
2.2.1.1. FMU import .............................................................................................. 3
2.2.1.2. Simulink Coder/Real-Time Workshop ............................................................ 4
2.3. Installation procedure ....................................................................................................... 6
2.3.1. For Windows ....................................................................................................... 6
2.3.2. For Linux ............................................................................................................ 7
2.3.3. Set MATLAB path ................................................................................................ 7
2.3.4. Unattended installation ........................................................................................... 7
2.3.4.1. Windows ................................................................................................... 7
2.3.4.2. Linux ....................................................................................................... 8
2.4. License information ......................................................................................................... 9
2.4.1. Demo mode ......................................................................................................... 9
2.5. Uninstallation procedure ................................................................................................... 9
2.5.1. For Windows ....................................................................................................... 9
2.5.2. For Linux ............................................................................................................ 9
2.5.3. Unattended uninstallation ...................................................................................... 10
2.5.3.1. Windows ................................................................................................. 10
2.5.3.2. Linux ...................................................................................................... 10
2.6. Support ........................................................................................................................ 11
3. Simulation with Simulink .......................................................................................................... 12
3.1. Introduction .................................................................................................................. 12
3.2. Getting started ............................................................................................................... 12
3.3. FMU block properties ..................................................................................................... 18
3.3.1. Set parameters and variables start values .................................................................. 18
3.3.2. Input ports ......................................................................................................... 21
3.3.3. Output ports ....................................................................................................... 21
3.3.3.1. Direct Feedthrough .................................................................................... 24
3.3.4. FMU model information ....................................................................................... 26
3.3.5. Log ................................................................................................................... 28
3.3.5.1. Create result file ....................................................................................... 29
3.3.5.2. Logger .................................................................................................... 30
3.3.6. Advanced ........................................................................................................... 30
3.3.6.1. Block icon and mask ................................................................................. 31
3.3.6.2. Tolerances (Not for FMU CS 1.0) ................................................................ 32
FMI Toolbox User's Guide 2.6.4
iv
3.3.6.3. Sample times (FMU CS block only) ............................................................. 32
3.3.6.4. Reload FMU ............................................................................................ 32
3.3.6.5. Find FMU file on Model load ..................................................................... 32
3.3.7. Coder ................................................................................................................ 33
3.3.8. Scripting FMU block ........................................................................................... 34
3.3.9. Load FMU model ................................................................................................ 35
3.3.10. Reset an FMU model ......................................................................................... 36
3.3.11. Reload FMU model ............................................................................................ 36
3.3.12. Add Structured Ports to the FMU Block ................................................................ 36
3.3.13. Using the filter functions ..................................................................................... 36
3.4. FMU block and Simulink Coder ....................................................................................... 37
3.5. Examples ...................................................................................................................... 38
3.5.1. Changing start values and using the filter functions .................................................... 38
3.5.2. Configure outputs ................................................................................................ 40
3.5.3. Configure ports using structural naming ................................................................... 45
3.5.4. Build target containing an FMU block ..................................................................... 50
3.5.5. Build rti1006.tlc target containing an FMU block ...................................................... 54
3.5.5.1. Set start values and parameters .................................................................... 57
4. Simulation in MATLAB ............................................................................................................ 58
4.1. Introduction .................................................................................................................. 58
4.2. A first example ............................................................................................................. 58
4.3. Using the FMU model classes .......................................................................................... 60
4.3.1. Handle class ....................................................................................................... 60
4.3.2. Calling functions ................................................................................................. 60
4.3.3. Help .................................................................................................................. 61
4.4. Examples ...................................................................................................................... 62
4.4.1. Set start values and parameters .............................................................................. 62
4.4.2. Simulation with inputs .......................................................................................... 64
4.4.3. Simulation with configured output .......................................................................... 66
4.4.3.1. Using custom solver (Model Exchange only) .................................................. 68
4.5. Upgrading to FMI 2.0 ..................................................................................................... 68
4.5.1. Converting from FMI 1.0 to FMI 2.0 ...................................................................... 68
4.5.2. Using both FMI 1.0 and FMI 2.0 in scripts .............................................................. 70
5. FMU export from Simulink ........................................................................................................ 71
5.1. Introduction .................................................................................................................. 71
5.2. Getting started ............................................................................................................... 71
5.3. Simulink Coder targets for FMU export ............................................................................. 77
5.4. Selecting MEX C compiler .............................................................................................. 79
5.5. Co-Simulation export ...................................................................................................... 79
5.5.1. Synchronization of time ........................................................................................ 79
5.5.2. Capability flags ................................................................................................... 80
5.5.3. Configuration Parameters ...................................................................................... 81
FMI Toolbox User's Guide 2.6.4
v
5.5.3.1. Solver ..................................................................................................... 81
5.5.3.2. Optimization ............................................................................................ 81
5.5.3.3. Real-Time Workshop/Code Generation ......................................................... 81
5.5.4. Support for user defined S-Function blocks .............................................................. 84
5.6. Model Exchange export .................................................................................................. 86
5.6.1. Configuration Parameters ...................................................................................... 86
5.6.1.1. Solver ..................................................................................................... 86
5.6.1.2. Optimization ............................................................................................ 87
5.6.1.3. Real-Time Workshop/Code Generation ......................................................... 87
5.6.2. Support for user defined S-Function blocks .............................................................. 90
5.7. Parameters .................................................................................................................... 91
5.8. Internal signals .............................................................................................................. 91
5.8.1. Test points ......................................................................................................... 93
5.9. Supported data types ...................................................................................................... 94
5.10. Supported blocks .......................................................................................................... 95
5.11. Examples .................................................................................................................. 106
5.11.1. Using a Simulink model to control a Vehicle model ............................................... 106
5.11.1.1. Export Simulink model as FMU ............................................................... 106
5.11.1.2. Import FMU in vehicle model and simulate it in Dymola ............................... 108
6. Design of Experiments ............................................................................................................ 112
6.1. Introduction ................................................................................................................. 112
6.1.1. Concepts .......................................................................................................... 112
6.1.2. Workflow ......................................................................................................... 113
6.2. Getting started ............................................................................................................. 113
6.3. Function reference ........................................................................................................ 116
6.3.1. FMUModelME1 ................................................................................................ 117
6.3.1.1. trim ....................................................................................................... 117
6.3.1.2. linearize ................................................................................................. 118
6.3.2. FMUDoESetup .................................................................................................. 119
6.3.2.1. Constructor ............................................................................................ 119
6.3.2.2. DoE methods .......................................................................................... 122
6.3.3. FMUDoEResult ................................................................................................. 125
6.3.3.1. properties ............................................................................................... 125
6.3.3.2. main_effects ........................................................................................... 126
6.3.3.3. bode ...................................................................................................... 128
6.3.3.4. step ....................................................................................................... 129
6.4. Examples .................................................................................................................... 129
6.4.1. Mass-Spring system ........................................................................................... 129
6.4.1.1. Define the Experiment Setup ..................................................................... 129
6.4.1.2. Run DoE experiments .............................................................................. 130
6.4.1.3. Analyze results ....................................................................................... 131
7. Tutorial examples ................................................................................................................... 138
剩余186页未读,继续阅读
zgx1996
- 粉丝: 0
- 资源: 1
上传资源 快速赚钱
- 我的内容管理 收起
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
会员权益专享
最新资源
- RTL8188FU-Linux-v5.7.4.2-36687.20200602.tar(20765).gz
- c++校园超市商品信息管理系统课程设计说明书(含源代码) (2).pdf
- 建筑供配电系统相关课件.pptx
- 企业管理规章制度及管理模式.doc
- vb打开摄像头.doc
- 云计算-可信计算中认证协议改进方案.pdf
- [详细完整版]单片机编程4.ppt
- c语言常用算法.pdf
- c++经典程序代码大全.pdf
- 单片机数字时钟资料.doc
- 11项目管理前沿1.0.pptx
- 基于ssm的“魅力”繁峙宣传网站的设计与实现论文.doc
- 智慧交通综合解决方案.pptx
- 建筑防潮设计-PowerPointPresentati.pptx
- SPC统计过程控制程序.pptx
- SPC统计方法基础知识.pptx
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论0