Main Content

Simscape 言語の一般的なタスク

Simscape™ ブロック ライブラリには、バルブ、抵抗、バネなどの工学コンポーネントを表す広範なブロックが含まれています。しかし、あらかじめ用意されたこれらのブロックでは、工学上の要件に十分対応できない場合があります。既存のブロック ライブラリを拡張する必要がある場合は、Simscape 言語を使用して、カスタマイズしたコンポーネントや新たな物理ドメインをテキスト ファイルとして定義します。その後、テキスト コンポーネントを変換し、モデル ダイアグラムで使用できる Simscape ブロックのライブラリを追加することができます。

次の表に、一般的なタスクと背景情報および例のリンクを示します。

タスク背景情報
方程式に基づくカスタム コンポーネント モデルの作成

カスタム コンポーネントの作成

Declaring Domains and Components

Defining Component Equations

Model Linear Resistor in Simscape Language

Declare a Spring Component

Mechanical Component — Spring

Electrical Component — Ideal Capacitor

No-Flow Component — Voltage Sensor

Grounding Component — Electrical Reference

他のコンポーネントから構成されるカスタム コンポーネント モデルの作成

About Composite Components

Declaring Member Components

Parameterizing Composite Components

Specifying Component Connections

Composite Component — DC Motor

Simscape コンポーネント ファイルからのカスタム ブロックの生成

Selecting Component File Directly from Block

Customizing the Block Name and Appearance

Deploy a Component File in Block Diagram

Customize Block Display

Simscape ライブラリへのカスタム ブロック ライブラリの追加

Building Custom Block Libraries

Using Source Protection for Simscape Files

Customizing the Library Name and Appearance

Customizing the Block Name and Appearance

Create a Custom Block Library

Customize Block Display

関連するスルー変数とアクロス変数を含む新しいドメインを定義してカスタム コンポーネントで使用

When to Define a New Physical Domain

Declaring Domains and Components

Declare a Mechanical Rotational Domain

Propagation of Domain Parameters

ドメイン全体のパラメーター (流体温度など) をモデルの残りの部分に提供するコンポーネントの作成

Working with Domain Parameters

Custom Library with Propagation of Domain Parameters

異なる動作モードの離散集合により特徴付けられるコンポーネント (自動車のクラッチなど) の作成

Mode Chart Modeling

ヒステリシスをもつスイッチ