The Wayback Machine - https://web.archive.org/web/20120210033123/http://www.mathworks.com:80/help/toolbox/control/ref/ctrb.html
Skip to Main Content Skip to Search
Product Documentation

ctrb - Controllability matrix

Syntax

Co = ctrb(sys)

Description

ctrb computes the controllability matrix for state-space systems. For an n-by-n matrix A and an n-by-m matrix B, ctrb(A,B) returns the controllability matrix

(2-1)

where Co has n rows and nm columns.

Co = ctrb(sys) calculates the controllability matrix of the state-space LTI object sys. This syntax is equivalent to executing

Co = ctrb(sys.A,sys.B)

The system is controllable if Co has full rank n.

Examples

Check if the system with the following data

A =
     1     1
     4    -2

B =
     1    -1
     1    -1

is controllable. Type

Co=ctrb(A,B);

% Number of uncontrollable states
unco=length(A)-rank(Co)

These commands produce the following result.

unco =
     1

Limitations

Estimating the rank of the controllability matrix is ill-conditioned; that is, it is very sensitive to roundoff errors and errors in the data. An indication of this can be seen from this simple example.

This pair is controllable if but if , where eps is the relative machine precision. ctrb(A,B) returns

which is not full rank. For cases like these, it is better to determine the controllability of a system using ctrbf.

See Also

ctrbf | obsv

  


Free Control Systems Interactive Kit

Learn more about resources for designing, testing, and implementing control systems.

Get free kit

Trials Available

Try the latest control systems products.

Get trial software
 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS