H = getIOTransfer(T,in,out) returns
the transfer function from specified inputs to specified outputs of
a control system, computed from a closed-loop generalized model of
the control system.

Analyze responses of a control system by using getIOTransfer to compute responses between various inputs and outputs of a closed-loop model of the system.

Consider the following control system.

Create a genss model of the system by specifying and connecting the numeric plant models G1 and G2, the tunable controllers C1 and C2, and the AnalysisPoint blocks X1 and X2 that mark potential loop-opening or signal injection sites.

If you tuned the free parameters of this model (for example, using the tuning command systune), you might want to analyze the tuned system performance by examining various system responses.

For example, examine the response at the output, y, to a disturbance injected at the point .

H1 = getIOTransfer(T,'X1','y');

H1 represents the closed-loop response of the control system to a disturbance injected at the implicit input associated with the AnalysisPoint block X1, which is the location of :

H1 is a genss model that includes the tunable blocks of T. If you have tuned the free parameters of T, H1 allows you to validate the disturbance response of your tuned system. For example, you can use analysis commands such as bodeplot or stepplot to examine the the responses of H1. You can also use getValue to obtain the current value of H1, in which all the tunable blocks are evaluated to their current numeric values.

Similarly, examine the response at the output to a disturbance injected at the point .

H2 = getIOTransfer(T,'X2','y');

You can also generate a two-input, one-output model representing the response of the control system to simultaneous disturbances at both and . To do so, provide getIOTransfer with a cell array that specifies the multiple input locations.

Compute the response from r to y of the following cascaded control system, with the inner loop open, and the outer loop closed.

Create a genss model of the system by specifying and connecting the numeric plant models G1 and G2, the tunable controllers C1 and C2, and the AnalysisPoint blocks X1 and X2 that mark potential loop-opening or signal injection sites.

If you tuned the free parameters of this model (for example, using the tuning command systune), you might want to analyze the tuned system performance by examining various system responses.

For example, compute the response of the system with the inner loop open, and the outer loop closed.

H = getIOTransfer(T,'r','y','X2');

By default, the loops are closed at the analysis points X1 and X2. Specifying 'X2' for the openings argument causes getIOTransfer to open the loop at X2 for the purposes of computing the requested transfer from r to y. The switch at X1 remains closed for this computation.

Input to extracted transfer function, specified as a string
or cell array of strings. To extract a multiple-input transfer function
from the control system, use a cell array of strings. Each string
in in must match either:

An input of the control system model T (in
other words, a string contained in T.InputName).

An analysis point in T, corresponding
to a channel of an AnalysisPoint block in T.
Use getpoints(T) to get a full list of available
analysis points in T.

When you specify an analysis point as an input in, getIOTransfer uses
the input implicitly associated with the AnalysisPoint channel,
arranged as follows.

This input signal models a disturbance entering at the output
of the switch.

If an analysis point has the same name as an input of T,
then getIOTransfer uses the input of T.

Output of extracted transfer function, specified as a string
or cell array of strings. To extract a multiple-output transfer function
from the control system, use a cell array of strings. Each string
in out must match either:

An output of the control system model T (in
other words, a string contained in T.OutputName).

An analysis point in T, corresponding
to a channel of an AnalysisPoint block in T.
Use getPoints(T) to get a full list of available
analysis points in T.

When you specify an analysis point as an output out, getIOTransfer uses
the output implicitly associated with the AnalysisPoint channel,
arranged as follows.

If an analysis point has the same name as an output of T,
then getIOTransfer uses the output of T.

Locations for opening feedback loops for computation of the
response from in to out,
specified as string or cell array of strings that identify analysis
points in T. Analysis points are marked by AnalysisPoint blocks
in T. Use getPoints(T) to
get a full list of available loop-opening sites in T.

Use openings when you want to compute the
response from in to out with
some loops in the control system open. For example, in a cascaded
loop configuration, you can calculate the response from the system
input to the system output with the inner loop open.

You can use getIOTransfer to extract
various subsystem responses, given a generalized model of the overall
control system. This is useful for validating responses of a control
system that you tune with tuning commands such as systune.

For example, in addition to evaluating the overall response
of a tuned control system from inputs to outputs, you can use getIOTransfer to
extract the transfer function from a disturbance input to a system
output. Evaluate the responses of that transfer function (such as
with step or bode) to confirm
that the tuned system meets your disturbance rejection requirements.

getIOTransfer is the genss equivalent
to the Simulink^{®} Control Design™getIOTransfer command,
which works with the slTuner and slLinearizer interfaces.
Use the Simulink Control Design command when your control system
is modeled in Simulink.