A composite component is constructed out of other components. To create a composite component, you have to list the names of the member (constituent) components and then specify how the ports of the member components are connected to each other and to the external ports of the composite component. You also specify which parameters of the member components are to be visible, and therefore adjustable, in the block dialog box of the composite component.
|Convert subsystem containing Simscape blocks into equivalent Simscape file or files|
A composite component is constructed out of other components.
components declaration block begins with
components keyword and is terminated by an
Composite component parameters let you adjust the desired parameters of the underlying member components from the top-level block dialog box when building and simulating a model.
Member components have to be declared with
therefore their variables do not appear in the Variables tab of the top-level block dialog box.
The structure section of a Simscape™ file is executed once during compilation.
This example shows how to implement a DC motor model by means of a composite component.
An import mechanism provides a convenient means to accessing classes defined in different scopes, or namespaces.
This example shows how you can use
to implement a DC motor model by means of a composite component.
You can generate a composite component from a subsystem consisting entirely of Simscape blocks.
Use parametric-sized arrays of member components in composite components.
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.
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.