没有合适的资源?快使用搜索试试~ 我知道了~
首页Maab [ Simulink 建模规范 ]
资源详情
资源评论
资源推荐
1
CONTROL ALGORITHM MODELING
GUIDELINES USING
MATLAB
®
,
Simulink
®
, and Stateflow
®
Version 2.0
MathWorks Automotive Advisory Board
(MAAB)
July 27
th
, 2007
2
CONTROL ALGORITHM MODELING GUIDELINES USING MATLAB
®
, SIMULINK
®
, AND
STATEFLOW
®
............................................................................................................................................. 1
1. HISTORY.................................................................................................................................................. 5
2. INTRODUCTION.................................................................................................................................... 6
2.1. MOTIVATION ........................................................................................................................................ 6
2.1.1. Guideline template........................................................................................................................ 6
2.1.2. Guideline ID:................................................................................................................................ 6
2.1.3. Guideline Title:............................................................................................................................. 7
2.1.4. Priority:........................................................................................................................................ 7
2.1.5. Scope: ........................................................................................................................................... 8
2.1.6. MATLAB
®
Versions...................................................................................................................... 8
2.1.7. Prerequisites: ............................................................................................................................... 8
2.1.8. Description:.................................................................................................................................. 8
2.1.9. Rationale:..................................................................................................................................... 8
2.1.10. Last change: ............................................................................................................................... 9
2.2. DOCUMENT USAGE............................................................................................................................... 9
2.2.1. Guideline Interaction Semantics................................................................................................... 9
3. NAMING CONVENTIONS .................................................................................................................. 10
3.1. GENERAL GUIDELINES ....................................................................................................................... 10
3.1.1. ar_0001: Filenames.................................................................................................................... 10
3.1.2. ar_0002: Directory names.......................................................................................................... 10
3.2. MODEL CONTENT GUIDELINES........................................................................................................... 11
3.2.1. jc_0201: Usable characters for Subsystem name....................................................................... 11
3.2.2. jc_0211: Usable characters for Inport block and Outport block ............................................... 12
3.2.3. jc_0221: Usable characters for signal line name....................................................................... 12
3.2.4. jc_0231: Usable characters for block names ............................................................................. 13
3.2.5. na_0014: Use of local language in Simulink and Stateflow....................................................... 13
4. MODEL ARCHITECTURE ................................................................................................................. 16
4.1. SIMULINK
®
AND STATEFLOW
®
PARTITIONING.................................................................................... 16
4.1.1. na_0006: Guidelines for mixed use of Simulink and Stateflow................................................... 16
4.1.2. na_0007: Guidelines for use of Flow Charts, Truth Tables and State Machines....................... 22
4.2. SUBSYSTEM HIERARCHIES.................................................................................................................. 22
4.2.1. db_0143: Similar block types on the model levels...................................................................... 22
4.2.2. db_0144: Use of Subsystems ...................................................................................................... 23
4.2.3. db_0040: Model hierarchy ......................................................................................................... 24
4.3. J-MAAB MODEL ARCHITECTURE DECOMPOSITION........................................................................... 24
4.3.1. jc_0301: Controller model ......................................................................................................... 24
4.3.2. jc_0311: Top layer / root level ................................................................................................... 25
4.3.3. jc_0321: Trigger layer................................................................................................................ 26
4.3.4. jc_0331: Structure layer............................................................................................................. 26
4.3.5. jc_0341: Data flow layer............................................................................................................ 27
5. MODEL CONFIGURATION OPTIONS ............................................................................................ 29
5.1.1. jc_0011: Optimization parameters for Boolean data types........................................................ 29
5.1.2. jc_0021: Model diagnostic settings............................................................................................ 29
6. SIMULINK ............................................................................................................................................. 31
6.1. DIAGRAM APPEARANCE ..................................................................................................................... 31
6.1.1. na_0004: Simulink model appearance .......................................................................................31
6.1.2. db_0043: Simulink font and font size.......................................................................................... 32
6.1.3. db_0042: Port block in Simulink models.................................................................................... 33
3
6.1.4. na_0005: Port block name visibility in Simulink models............................................................ 34
6.1.5. jc_0081: Icon display for Port block.......................................................................................... 34
6.1.6. jm_0002: Block resizing ............................................................................................................. 35
6.1.7. db_0142: Position of block names.............................................................................................. 36
6.1.8. jc_0061: Display of block names................................................................................................ 36
6.1.9. db_0146: Triggered, enabled, conditional Subsystems .............................................................. 37
6.1.10. db_0140: Display of basic block parameters ........................................................................... 38
6.1.11. jm_0013: Annotations............................................................................................................... 39
6.1.12. db_0032: Simulink signal appearance .....................................................................................39
6.1.13. db_0141: Signal flow in Simulink models.................................................................................40
6.1.14. jc_0171: Maintaining signal flow when using Goto and From blocks..................................... 41
6.1.15. jm_0010: Port block names in Simulink models....................................................................... 42
6.1.16. jc_0281: Naming of Trigger Port block and Enable Port block............................................... 42
6.2. SIGNALS ............................................................................................................................................. 43
6.2.1. na_0008: Display of labels on signals........................................................................................ 43
6.2.2. na_0009: Entry versus propagation of signal labels.................................................................. 44
6.2.3. db_0097: Position of labels for signals and busses.................................................................... 45
6.2.4. db_0081: Unconnected signals, block inputs and block outputs................................................ 46
6.3. BLOCK USAGE.................................................................................................................................... 46
6.3.1. na_0003: Simple logical expressions in If Condition block ....................................................... 46
6.3.2. na_0002: Appropriate implementation of fundamental logical and numerical operations........ 48
6.3.3. jm_0001: Prohibited Simulink standard blocks inside controllers............................................. 49
6.3.4. hd_0001: Prohibited Simulink sinks........................................................................................... 51
6.3.5. na_0011: Scope of Goto and From blocks ................................................................................. 51
6.3.6. jc_0141: Use of the Switch block................................................................................................ 52
6.3.7. jc_0121: Use of the Sum block ................................................................................................... 53
6.3.8. jc_0131: Use of Relational Operator block................................................................................54
6.3.9. jc_0161: Use of Data Store Read/Write/Memory blocks............................................................ 55
6.4. BLOCK PARAMETERS.......................................................................................................................... 55
6.4.1. db_0112: Indexing...................................................................................................................... 55
6.4.2. na_0010: Grouping data flows into signals...............................................................................56
6.4.3. db_0110: Tunable parameters in basic blocks........................................................................... 57
6.5. SIMULINK PATTERNS.......................................................................................................................... 58
6.5.1. na_0012: Use of Switch vs. If-Then-Else Action Subsystem....................................................... 58
6.5.2. db_0114: Simulink patterns for If-then-else-if constructs .......................................................... 59
6.5.3. db_0115: Simulink patterns for case constructs......................................................................... 60
6.5.4. db_0116: Simulink patterns for logical constructs with logical blocks...................................... 62
6.5.5. db_0117: Simulink patterns for vector signals........................................................................... 62
6.5.6. jc_0351: Methods of initialization.............................................................................................. 64
6.5.7. jc_0111: Direction of Subsystem................................................................................................ 65
7. STATEFLOW......................................................................................................................................... 67
7.1. CHART APPEARANCE.......................................................................................................................... 67
7.1.1. db_0123: Stateflow port names .................................................................................................. 67
7.1.2. db_0129: Stateflow transition appearance.................................................................................67
7.1.3. db_0137: States in state machines.............................................................................................. 68
7.1.4. db_0133: Use of patterns for Flowcharts................................................................................... 69
7.1.5. db_0132: Transitions in Flowcharts........................................................................................... 69
7.1.6. jc_0501: Format of entries in a State block................................................................................ 71
7.1.7. jc_0511: Setting the return value from a graphical function...................................................... 72
7.1.8. jc_0531: Placement of the default transition.............................................................................. 73
7.1.9. jc_0521: Use of the return value from graphical functions........................................................ 74
7.2. STATEFLOW DATA AND OPERATIONS.................................................................................................. 75
7.2.1. na_0001: Bitwise Stateflow operators........................................................................................ 75
7.2.2. jc_0451: Use of unary minus on unsigned integers in Stateflow................................................ 76
7.2.3. na_0013: Comparison operation in Stateflow............................................................................ 76
4
7.2.4. db_0122: Stateflow and Simulink interface signals and parameters.......................................... 77
7.2.5. db_0125: Scope of internal signals and local auxiliary variables ............................................. 78
7.2.6. jc_0481: Use of hard equality comparisons for floating point numbers in Stateflow ................ 79
7.2.7. jc_0491: Reuse of variables within a single Stateflow scope ..................................................... 80
7.2.8. jc_0541: Use of tunable parameters in Stateflow....................................................................... 81
7.2.9. db_0127: MATLAB commands in Stateflow............................................................................... 82
7.2.10. jm_0011: Pointers in Stateflow ................................................................................................ 83
7.3. EVENTS .............................................................................................................................................. 83
7.3.1. db_0126: Scope of events ........................................................................................................... 83
7.3.2. jm_0012: Event broadcasts ........................................................................................................ 83
7.4. STATECHART PATTERNS..................................................................................................................... 84
7.4.1. db_0150: State machine patterns for conditions ........................................................................ 84
7.4.2. db_0151: State machine patterns for transition actions............................................................. 85
7.5. FLOWCHART PATTERNS...................................................................................................................... 86
7.5.1. db_0148: Flowchart patterns for conditions.............................................................................. 86
7.5.2. db_0149: Flowchart patterns for condition actions................................................................... 88
7.5.3. db_0134: Flowchart patterns for If constructs........................................................................... 89
7.5.4. db_0159: Flowchart patterns for case constructs ...................................................................... 91
7.5.5. db_0135: Flowchart patterns for loop constructs ...................................................................... 92
8. APPENDIX A: RECOMMENDATIONS FOR AUTOMATION TOOLS ....................................... 94
9. APPENDIX B: GUIDELINE WRITING............................................................................................. 95
10. APPENDIX C: FLOWCHART REFERENCE ................................................................................. 96
11. GLOSSARY........................................................................................................................................ 102
5
1.History
Date Change
02.04.2001 Initial document Release, Version 1.00
04.27.2007 Version 2.00 Update release
剩余109页未读,继续阅读
vera139
- 粉丝: 1
- 资源: 7
上传资源 快速赚钱
- 我的内容管理 收起
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
会员权益专享
最新资源
- 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
- MW全能培训汽轮机调节保安系统PPT教学课件.pptx
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论14