refine matlab,Refine Highlighted Model

Refine Highlighted Model

After you highlight a model using Model Slicer, you can refine the dependency paths in

the highlighted portion of the model. Using Model Slicer, you can refine a highlighted

model by including only those blocks used in a portion of a simulation time window, or

by excluding blocks or certain inputs of switch blocks. By refining the highlighted

portion of your model, you can include only the relevant parts of your model.Define a Simulation Time Window

You can refine a highlighted model to include only those blocks used in a portion

of a simulation time window. Defining the simulation time window holds some switch

blocks constant, and as a result removes inactive inputs.

Add the example folder to the search path.

addpath(fullfile(docroot,'toolbox','simulink','examples'))

Open the sldvSliceClimateControlExample model.

sldvSliceClimateControlExample

On the Apps tab, under Model Verification,

Validation, and Test gallery, click Model

Slicer.

When you open the Model Slice Manager, Model Slicer compiles the model.

You then configure the model slice properties.

In the Model Slice Manager, click the arrow to expand the Slice

configuration list.

Set the slice properties:

Name:

Out1Simulation

Color: 08c15389905d69085b0d4e113053156d.png (cyan)

Signal propagation:

upstream

0bb69f3582ce8c401901a66ee20a0fe8.png

In the top level of the model, select the Out1 block as

the slice starting point. Right-click the Out1 block and

select Model Slicer > Add as Starting

Point.

The model is highlighted.

In the Model Slice Manager, select Simulation time

window.

To specify the stop time of the simulation time window, click the run

simulation button ef71a9d2e5f9233b20ead7a11845e6bb.png in the Model Slice Manager.

Set the Stop time to 10.

Click OK to start the simulation.

052343a35942ec2d95db9e5bee875fc4.png

The path is restricted to only those blocks that are active until the stop

time that you entered.

7ce7f0aaab25849c1335d708f5bfbadc.png

To highlight the model for a defined simulation time window, set the

Stop time to 5. Click

Highlight.

459db5d39dbcdd0cfe71a9a3eb51b9c6.png

To see how this constraint affects the

highlighted portion of the model, open the Refrigeration

subsystem.

The highlighted portion of the model includes only the input ports of

switches that are active in the simulation time window that you

specified.

367108f5bced9eefc902a3af2abd508d.png

After you refine your highlighted model to include only those blocks used in a

portion of a simulation time window, you can then Create a Simplified Standalone Model incorporating the highlighted portion of your model.Exclude Blocks

You can refine a highlighted model to exclude blocks from the analysis. Excluding

a block halts the propagation of dependencies, so that signals and model items

beyond the excluded block in the analysis direction are ignored.

Exclusion points are useful for viewing a simplified set of model dependencies.

For example, control feedback paths create wide dependencies and extensive model

highlighting. You can use an exclusion point to restrict the analysis, particularly

if your model has feedback paths.

Note

Simplified standalone model creation is not supported for highlighted models

with exclusion points.

In the Model Slice Manager, click the arrow to expand the Slice

configuration list.

To add a new slice configuration, click the add new button 76115b445f43a57fd7b3860508c185a2.png.

Set the slice properties:

Name: Out1Excluded

Color: c6a286678c9628056bb08dfef3d171a9.png (red)

Signal Propagation:

upstream

In the top level of the model, select the Out1 block as

the slice starting point. Right-click the Out1 block and

select Model Slicer > Add as Starting Point.

d243f2373f1c2deb7a9e74e5e496c185.png

The model is highlighted.

To open the subsystem, double-click

Refrigeration.

Right-click the Fan switch block, and then select

Model Slicer > Add as Exclusion

Point.

The blocks that are exclusively upstream of the Fan

switch block are no longer highlighted.

The DT Fan Data Store Read block is

no longer highlighted.

44ae5b4aa2d173f17e4912deb55cfe87.png

To see how this constraint affects the

highlighted portion of the model, view the parent system.

The DSM fan temp Data Store Memory block and the

Write2 Data Store Write block are

no longer highlighted, because the

DT Fan Data Store Read in the

Refrigeration subsystem

no longer accesses them.

47733969ee0ae00d255753a6a7dfefbc.pngExclude Inputs of a Switch Block

For complex signal routing, you can constrain the dependency analysis paths to a

subset of the available paths through switch blocks. Constraints appear in the Model

Slice Manager.

Note

Simplified standalone model creation is not supported for highlighted

models with constrained switch blocks.

Double-click Refrigeration to open the

subsystem.

Constrain the On switch block:

Right-click the switch block and select Model Slicer

> Add Constraint.

In the Constraints dialog box, select Port

3.

Click OK.

4e2df9ceac2d5f5a808cee539944af7a.png

The path is restricted to the Constant1 port on the

switch. The blocks that are upstream of Port 1 and

Port 2 of the constrained switch are

no longer highlighted. Only the blocks

upstream of Port 3 are highlighted.

54e9f59f4cb52e38dc09902eedb4042a.png

To see how this constraint affects the

highlighted portion of the model, view the parent system.

33c7436ab37e9f2c86cc67c6e383fda8.png

Related Topics

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值