Hauptinhalt

Die Übersetzung dieser Seite ist veraltet. Klicken Sie hier, um die neueste Version auf Englisch zu sehen.

Zusammengesetzte Komponenten

Konstruieren benutzerdefinierter Komponenten durch Verbinden mehrerer Komponenten

Eine zusammengesetzte Komponente wird mithilfe anderer Komponenten konstruiert. Zum Erstellen einer zusammengesetzten Komponente müssen Sie die Namen der Teilkomponenten (Bestandteile) auflisten und dann festlegen, wie die Anschlüsse der Teilkomponenten miteinander und mit den externen Anschlüssen der zusammengesetzten Komponente verbunden werden. Außerdem legen Sie fest, welche Parameter der Teilkomponenten im Dialogfenster des Blocks der zusammengesetzten Komponente sichtbar sein sollen und somit angepasst werden können.

Sprachsyntax

componentsDeclare member components included in composite component
connectConnect two or more component ports of the same type
connectionsDefine connections for member component ports in composite component
importImport model classes

Funktionen

subsystem2sscConvert subsystem containing Simscape blocks into equivalent Simscape file or files

Themen

Grundlegende Verfahren zum Erstellen zusammengesetzter Komponenten

Komponentenvarianten

Komponentenarrays

  • Component Arrays
    Use parametric-sized arrays of member components in composite components.
  • Segmented Pipeline Using Component Array
    This example shows how you can model a segmented pipeline using an array of identical pipe segments, connected in series. The size of the array corresponds to the number of segments, and the block user can modify this parameter.
  • Segmented Pipeline with Different Pipe Lengths Using Component Array
    This example shows how you can model a segmented pipeline with segments of different lengths, connected in series, using an array of components. The block user provides the lengths of individual pipe segments, and the model automatically determines the size of the array based on that data.
  • Case Study — Battery Pack with Fault Using Arrays
    This case study shows how you can use component arrays to model a battery pack consisting of multiple series-connected cells. It also shows how you can introduce a fault into one of the cells to see the impact on battery performance and cell temperatures. The block user can modify both the number of cells and the position of the faulted cell as block parameters.
  • Arrays of Nodes
    Use parametric-sized arrays of nodes to specify element-wise connections between arrays of components.
  • Using MATLAB Functions with Arrays of Components and Nodes
    Use array manipulation and query functions on an object array.