Main Content

이 번역 페이지는 최신 내용을 담고 있지 않습니다. 최신 내용을 영문으로 보려면 여기를 클릭하십시오.

사용자 지정 컴포넌트

Simscape™ 파일을 작성하여 사용자 지정 컴포넌트 표현

Simscape 언어를 사용하면 사용자 지정 컴포넌트를 파라미터화, 물리적 연결, 기본 방정식을 모두 갖춘 텍스트 파일로 정의할 수 있습니다. 이 페이지에 나열된 항목은 컴포넌트 파라미터, 변수 및 연결을 선언하는 방법에 대한 자세한 정보를 제공합니다. 사용자 지정 컴포넌트 정의의 다른 측면에 대해서는 방정식 항목, 이산 이벤트 및 모드 차트 항목, 복합 컴포넌트 항목을 참조하십시오.

사용자 지정 컴포넌트 작성을 시작하려면 일반적인 워크플로에 대한 개요를 제공하는 Creating Custom Components 항목을 참조하십시오. 이 페이지 하단의 "참조 응용 프로그램 컴포넌트" 아래에 나열된 항목은 각 사례에 사용된 기법을 보여주는 자세한 설명과 함께 전체 컴포넌트 예제를 제공합니다.

언어 구문

annotationsControl appearance of Simscape block based on the component
branchesEstablish relationship between component Through variables and nodes
componentComponent model keywords
inputsDefine component inputs, that is, Physical Signal input ports of block
nodesDefine component nodes, that is, conserving ports of block
outputsDefine component outputs, that is, Physical Signal output ports of block
parametersDeclare domain or component parameters
variablesDeclare domain or component variables

도움말 항목

기본 기법

선언 및 분기

  • Declaring Domains and Components
    Declaration section of domain and component files: purpose, definitions, rules, member summaries.
  • Declare a Spring Component
    The following diagram shows a network representation of a mass-spring-damper system, consisting of four components (mass, spring, damper, and reference) in a mechanical rotational domain.
  • Declare Component Parameters
    Component parameters let you specify adjustable parameters for the Simscape block generated from the component file.
  • Declare Component Nodes
    Component nodes define the conserving ports of a Simscape block generated from the component file.
  • Declare Component Inputs and Outputs
    In addition to conserving ports, Simscape blocks can contain Physical Signal input and output ports, directional ports that carry signals with associated units.
  • Declare Component Variables
    When you declare Through and Across variables in a component, you are essentially creating instances of domain Through and Across variables.
  • Define Relationship Between Component Variables and Nodes
    How to connect Through and Across variables declared in a component file to the domain Through and Across variables.
  • Declaration Functions
    Use MATLAB® functions to compute derived parameter values or initialize variables.

컴포넌트 변형

고급 기법

  • Enumerations
    Specify a discrete set of acceptable values for parameters and event variables.
  • Subclassing and Inheritance
    Subclassing allows you to build component models based on other component models by extension.

참조 응용 프로그램 컴포넌트