Input Port
SubsystemsThe InPort (Input Port) block establishes an input interface for a Subsystem container. It receives signals arriving at the subsystem's external boundary and exposes them internally to downstream blocks.
Placing an InPort inside a subsystem automatically generates a corresponding input pin on the parent Subsystem block in the outer diagram, enabling modular, hierarchical model construction and clean encapsulation of complex dynamical systems.
Mathematical Model
The InPort block operates as a transparent signal boundary pass-through:
where:
- is the signal connected to the Subsystem block's outer input pin.
- is the configured
defaultValueparameter. - The signal crosses the hierarchical boundary instantaneously with zero phase lag:
Inputs & Outputs
| Direction | ID | Label | Type | Status |
|---|---|---|---|---|
| ← Out | out |
Internal Output | number | Output |
Parameters
| Parameters | Label | Type | Default | Description |
|---|---|---|---|---|
portName |
Port Name | text | input1 |
|
defaultValue |
Default Value | number | 0 |
Usage Examples
Example 1: Closed-Loop Speed Controller Subsystem Interface
Constructing a modular speed controller subsystem containing error calculation and PID compensation. Adding two InPort blocks named "setpoint" and "feedback" inside the subsystem generates two distinct input pins on the parent subsystem block, allowing clean external wiring to reference generators and tachometers.
Example 2: Multi-Axis Kinematic InPort Array
Encapsulating a 3-axis robot arm kinematics calculation inside a subsystem. Three InPort blocks named "x_ref", "y_ref", and "z_ref" with defaultValue = 0.0 expose clean Cartesian reference inputs on the subsystem boundary.
Remarks & Best Practices
- Subsystem Boundary Generation: Each InPort block placed inside a subsystem dynamically creates an external input connection handle on the parent Subsystem block.
- Zero Propagation Latency: Signals pass from external connections to internal blocks within the same solver timestep with zero numerical phase lag.
- Safe Default Fallback: When an external connection is missing,
defaultValueprovides a well-defined fallback to prevent undefined or NaN states. - Subsystem Layout Convention: Place InPort blocks on the left side of the subsystem canvas to maintain standard left-to-right (West-to-East) signal flow.