Simulink建模规范(MAAB)之模型架构设计

更多精彩干货分享,请关注我的个人微信公众号:MBD开发者星球;

​1、na_0006: Guidelines for mixed use of Simulink and Stateflow

ID: Title

na_0006: Guidelines for mixed use of Simulink and Stateflow(Simulink 和 Stateflow混合使用准则)

Priority

Strongly recommended(强烈推荐)

Scope

MAAB

MATLAB  Version

ALL

Prerequisites

 None

Description

选择是使用Simulink还是Stateflow来对给定部分的控制算法功能进行建模,应该由所建模的行为的性质来决定。

-如果功能主要包含复杂的逻辑操作,则使用Stateflow状态图。

使用Stateflow状态图结合过去和现在的逻辑条件变化控制实现当前的功能逻辑。

-如果功能主要包含数值运算,则使用Simulink模块。

Rationale

☑Readability  ☑Verification and Validation

☑Workflow     ☑Code Generation

☑Simulation

Last  Change

V2.0

2、na_0007: Guidelines for use of Flow Charts, Truth Tables and State Machines

ID: Title

na_0007: Guidelines for use of Flow Charts, Truth Tables and State Machines(流程图、状态机和真值表使用准则)

Priority

Strongly recommended(强烈推荐)

Scope

MAAB

MATLAB  Version

ALL

Prerequisites

 None

Description

在Stateflow中,根据建模的行为性质决定使用流程图还是状态图对给定的控制算法功能进行建模。

-如果主要功能是计算操作模式或离散值状态,则使用状态图。比如包含成功、失败、禁止和冲突等状态的诊断模型;计算一个控制算法不同运行模式的模型等。

-如果主要功能包含if-then-else等陈述,使用流程图或者真值表。

Rationale

☑Readability  ☑Verification and Validation

☑Workflow     ☑Code Generation

☑Simulation

Last  Change

V2.0

3、db_0143: Similar block types on the model levels

ID: Title

db_0143: Similar block types on the model levels

Priority

Strongly recommended(强烈推荐)

Scope

NA-MAAB

MATLAB  Version

ALL

Prerequisites

 None

Description

为了将模型划分为独立的单元模型,模型的每一个层级都必须使用相同的模块构建。下列模块用于信号路由,可以将他们放在模型的任意层级。

Action port1、Bus Creator、Bus Selector

、Case、Data Store Memory 、Data Type Conversion 、Demux、Enable2 、From 、Function-Call Generator 、Function-Call Split 、Goto、Ground 、If 、Inport 、Merge 、Mux 、Outport、Rate Transition 、Selector 、Terminator 、Trigger3 、Unit Delay

注意:

-Action port不允许在模型顶层使用。

-从R2011b开始,使能模块 the Enable block允许在模型顶层使用。

-从R2009a开始,触发模块 the Trigger block 允许在模型顶层使用。

Rationale

☑Readability  ☑Verification and Validation

☑Workflow     ☐Code Generation

☐Simulation

Last  Change

V2.2

4、db_0144: Use of Subsystems

ID: Title

db_0144: Use of Subsystems

Priority

Strongly recommended(强烈推荐)

Scope

MAAB

MATLAB  Version

ALL

Prerequisites

 None

Description

simulink模块需要根据功能分解拆分成子系统。为了增加模型的可读性,可以使用子系统。不能为了节省空间而使用子系统,每个子系统应该代表可以实现特性需求的单元,也可以根据行为变量或者时间组合在一起。

Rationale

☑Readability  ☑Verification and Validation

☑Workflow    ☑Code Generation

☐Simulation

Last  Change

V2.2

5、db_0040: Model hierarchy

ID: Title

db_0040: Model hierarchy

Priority

Strongly recommended(强烈推荐)

Scope

MAAB

MATLAB  Version

ALL

Prerequisites

 None

Description

模型的层次结构需要根据控制系统的功能架构来设计。

Rationale

☑Readability  ☑Verification and Validation

☑Workflow    ☑Code Generation

☐Simulation

Last  Change

V2.0

6、na_0037: Use of single variable variant conditionals

ID: Title

na_0037: Use of single variable variant conditionals

Priority

Recommended(推荐)

Scope

MAAB

MATLAB  Version

ALL

Prerequisites

 None

Description

变量条件表达式应使用具有复合条件的单个变量或具有单个条件的多个变量组成。为了增加可读性可以使用枚举类型。

Rationale

☑Readability  ☐Verification and Validation

☐Workflow    ☑Code Generation

☑Simulation

Last  Change

V3.0

7、na_0020: Number of inputs to variant subsystems

ID: Title

na_0020: Number of inputs to variant subsystems

Priority

Recommended(推荐)

Scope

NA-MAAB

MATLAB  Version

ALL

Prerequisites

 None

Description

当变量子系统不使用所有的输入的时候,使用终止符终止。

Rationale

☑Readability  ☐Verification and Validation

☐Workflow    ☑Code Generation

☑Simulation

Last  Change

V3.0

8、na_0036: Default variant

ID: Title

na_0036: Default variant

Priority

Recommended(推荐)

Scope

NA-MAAB

MATLAB  Version

ALL

Prerequisites

 na_0037: Use of single variable variant conditionals

Description

所有的变体子系统和模型需要配置其中一个子系统被选择。可以通过以下来实现:使用默认的变体;定义的条件要覆盖所有条件的可能性。

Rationale

☑Readability  ☐Verification and Validation

☐Workflow    ☑Code Generation

☑Simulation

Last  Change

V3.0

9、jc_0301: Controller model

ID: Title

jc_0301: Controller model

Priority

Mandatory(强制的)

Scope

J-MAAB

MATLAB  Version

ALL

Prerequisites

 None

Description

控制模型通过以下的层次架构来组织:1.顶层架构2.触发层3.架构层4.数据流层,触发层是可选

Rationale

☐Readability  ☐Verification and Validation

☑Workflow    ☐Code Generation

☐Simulation

Last  Change

V2.0

10、jc_0311: Top layer/root level

ID: Title

jc_0311: Top layer/root level

Priority

Mandatory(强制的)

Scope

J-MAAB

MATLAB  Version

ALL

Prerequisites

 None

Description

顶层设计包括输入变量、控制模型系统和输出变量

Rationale

☐Readability  ☐Verification and Validation

☑Workflow    ☐Code Generation

☐Simulation

Last  Change

V2.0

11、jc_0321: Trigger layer

ID: Title

jc_0321: Trigger layer

Priority

Mandatory(强制的)

Scope

J-MAAB

MATLAB  Version

ALL

Prerequisites

 None

Description

使用Triggerded子系统或者Function-Call子系统来实现。可以设置优先级,优先级值必须显示为块注释。您应该能够理解基于优先级的顺序,而不必打开块。

Rationale

☑Readability  ☐Verification and Validation

☑Workflow    ☑Code Generation

☐Simulation

Last  Change

V2.0

12、jc_0331: Structure layer

ID: Title

jc_0331: Structure layer

Priority

Mandatory(强制的)

Scope

J-MAAB

MATLAB  Version

ALL

Prerequisites

 None

Description

架构层的应该使用原子子系统;

指定输入块或子系统块需要定义子系统的任务时间。     

使用注释申明输入块或者子系统块,以及申明子系统的执行时间。

Rationale

☑Readability  ☐Verification and Validation

☑Workflow    ☑Code Generation

☐Simulation

Last  Change

V2.0

13、jc_0341: Data flow layer

ID: Title

jc_0341: Data flow layer

Priority

Mandatory(强制的)

Scope

J-MAAB

MATLAB  Version

ALL

Prerequisites

 None

Description

在输入块处使用块注释并显示其采样时间以澄清信号的执行定时。

Rationale

☐Readability  ☐Verification and Validation

☑Workflow    ☐Code Generation

☐Simulation

Last  Change

V2.0

 

  • 0
    点赞
  • 18
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值