Documentation Center

  • Trial Software
  • Product Updates


Get list of loop opening sites in generalized model of control system




Locations = getSwitches(T) returns the names of all loop-opening sites in a Generalized State-Space Model of a control system. Use these names to calculate open- or closed-loop responses using getLoopTransfer or getIOTransfer.


expand all

Loop Opening Sites in Control System Model

Build a closed-loop model of a cascaded feedback loop system, and get a list of loop-opening sites in the model.

Create a model of the following cascaded feedback loop. C1 and C2 are tunable controllers. X1 and X2 are loop-opening sites.

G1 = tf(10,[1 10]);
G2 = tf([1 2],[1 0.2 10]);
C1 ='C','pi');
C2 = ltiblock.gain('G',1);
X1 = loopswitch('X1');
X2 = loopswitch('X2');
T = feedback(G1*feedback(G2*C2,X2)*C1,X1);

T is a genss model whose Control Design Blocks include the tunable controllers and the switches X1 and X2.

Get a list of the loop-opening sites in T.

Locations = getSwitches(T)
Locations = 


getSwitches returns a cell array listing loop-opening sites in the model.

For more complicated closed-loop models, you can use getSwitches to keep track of a larger number of loop-opening sites. You can use these loop-opening sites to specify an open-loop response to compute. For instance, the following command computes the open-loop response of the inner loop, with the outer loop open.

L = getLoopTransfer(T,'X2',-1,'X1');

Input Arguments

expand all

T — Model of control systemgeneralized state-space model

Model of a control system, specified as a Generalized State-Space (genss) Model. Locations at which you can open loops and perform open-loop analysis are marked by loopswitch blocks in T.

Output Arguments

expand all

Locations — Loop-opening sitescell array of strings

Loop-opening sites in the control system model, returned as a cell array of strings. The strings contain the loop channel names. These loop channel names are the contents of the Location property of each loopswitch block in the control system model.

See Also

| | |

Was this topic helpful?