syscconnect(sys1,...sysN,inputs,outputs) connects the models and block diagram elements sys1,...sysN based on signal names. The connect command interconnects the block diagram elements by connecting input and output channels with matching names, as specified in the InputName and OutputName properties of sys1,...,sysN. The aggregate model sysc is a dynamic system model with inputs and outputs specified by inputs and outputs, respectively.
sysc = connect(sys1,...sysN,inputs,outputs,APs) inserts an AnalysisPoint at every signal location specified in APs. Use analysis points to mark locations of interest which are internal signals in the aggregate model. For instance, a location at which you want to extract a loop transfer function or measure the stability margins is a location of interest.
sysc = connect(blksys,connections,inputs,outputs) uses index-based interconnection to build sysc out of an aggregate, unconnected model blksys. The matrix connections specifies how the outputs and inputs of blksys interconnect. For index-based interconnections, inputs and outputs are index vectors that specify which inputs and outputs of blksys are the external inputs and outputs of sysc. This syntax can be convenient when you do not want to assign names to all inputs and outputs of all models to connect. However, in general, it is easier to keep track of named signals.
sysc = connect(___,opts) builds the interconnected model using additional options, including retaining unconnected states that do not contribute to the dynamics of sysc. To create opts, use connectOptions. You can use opts with the input arguments of any of the previous syntaxes.
In preparation for building the block diagram using signal names, assign to each element the input and output names shown in the block diagram. To do so, set the InputName and OutputName properties of the elements.
The block diagram also contains two summing junctions. One summing junction takes the difference between the reference signal r and the plant output y to compute the error signal e. The other summing junction adds the feedforward controller output uf to the feedback controller output uc to compute the plant input u. Use the sumblk command to create these summing junctions. To use sumblk, write the expression for the summing junction as a string.
You can now combine all the elements to create an aggregate model representing the response of the system in the block diagram from r to y. Provide connect with the list of elements to combine, the desired input signal of the aggregate model r, and the desired output signal y. The connect command automatically joins the elements by connecting inputs and outputs with matching names.
When you assign single names to vector-valued signals, the software automatically applies vector expansion to give each input and output channel a unique name. For instance, examine the names of the plant inputs.
This example uses vector expansion for the signal names of all MIMO components of the block diagram. You can instead name the signals individually, provided that you match the names of signals you want to join. For an example that uses individually named signals for some block-diagram elements, see MIMO Control System with Fixed and Tunable Components.
Next, create the vector-valued summing junction. sumblk also automatically expands the signal names you provide in the sum expression for the vector signals, as you can verify by examining the input names of S2.
You can create a model of this closed-loop system using feedback and use the model to study the system response from r to y. Suppose that you also want to study the response of the closed-loop system to a disturbance injected at the plant input. To do so, you can use connect to build the system, inserting an analysis point at the location u.
A control design block representing a tunable or uncertain block-diagram element, such as a tunablePID, tunableSS, tunableGain, tunableTF, tunableSurface, ultidyn (Robust Control Toolbox), or umargin (Robust Control Toolbox) block.
For name-based interconnection, provide a character vector, string, cell array of character vectors, or string array listing one or more signals that appear in the InputName or OutputName property of one or more of the block diagram elements sys1,...sysN. For example, 'ref','dist','noise'.
Locations (internal signals) of interest in the aggregate model, specified as a character vector or cell array of character vectors, such as 'X' or 'AP1','AP2', or a string or string vector. The resulting model contains an analysis point at each such location. (See AnalysisPoint). Each location in APs must correspond to an entry in the InputName or OutputName property of one or more of the block diagram elements sys1,...sysN.
Unconnected aggregate model, specified as a dynamic system model that you create with append. Use blksys for index-based interconnection. The append command stacks the inputs and outputs of the elements of your block diagram without making any interconnections between their inputs and outputs. For example, if your block diagram contains dynamic system models C, G, and S, create blksys with the following command:
Connections and summing junctions of the block diagram, specified as a matrix. Use connection for index-based interconnection. Each row of connections specifies one connection or summing junction in terms of the input vector u and output vector w of the unconnected aggregate model blksys. For example, the row
By default, the connect command discards states that do not contribute to the dynamics in the path between the inputs and outputs of the interconnected system. Use connectOptions to retain these states in the interconnected model. This option can be useful, for example, when you want to compute the interconnected system response from known initial state values of the components.
Interconnecting a numeric LTI model with a Control Design Block returns a generalized state-space model. For instance, interconnecting a tf model with a tunablePID Control Design Block returns a genss model.
By default, connect automatically discards states that do not contribute to the I/O transfer function from the specified inputs to the specified outputs of the interconnected model. To retain the unconnected states, set the Simplify option of connectOptions to false. For example:
You can specify analysis points when modeling block diagrams with connect. When combining the resulting models with any interconnection function, the software automatically renames these analysis point blocks to avoid conflict. Before R2024a, such combinations were not possible.
By default, the connect command discards states that do not contribute to the dynamics in the path between the inputs and outputs of the interconnected system. You can now use the opts input argument to retain such unconnected states. This option can be useful, for example, when you want to compute the interconnected system response from known initial state values of the components. Create opts with connectOptions.
connect always returns a state-space model, such as an ss, genss, or uss model, unless one or more of the input models is a frequency response data model. In that case, connect returns a frequency response data model, such as an frd or genfrd model. In previous releases, connect returned a tf or zpk model when all input models were tf or zpk models.
3a8082e126