A companion form contains the coefficients of a corresponding characteristic polynomial along one of its far rows or columns. For example, one companion form matrix is:
and another is:
Two companion forms are convenient to use in control theory, namely the observable canonical form and the controllable canonical form. These two forms are roughly transposes of each other (just as observability and controllability are dual ideas). When placed in one of these forms, the design of controllers or observers is simplified because the structure of the system is made apparent (and is easily modified with the desired control).
Controllable-Canonical Form is helpful in many cases, especially for designing controllers when the full state of the system is known.
The controllable-canonical form is as follows:
If we have two spaces, space v which is the original space of the system (A, B, C, and D), then we can transform our system into the w space which is in controllable-canonical form (Aw, Bw, Cw, Dw) using a transformation matrix Tw. We define this transformation matrix as:
Where ζ is the controllability matrix.
Notice that we know beforehand Aw and Bw, since we know both the form of the matrices and the coefficients of the equation (e.g. a linear ODE with constant coefficients or a transfer function).
We can form ζw if we know these two matrices. We can then use this matrix to create our transformation matrix.
We will discuss the controllable canonical form later when discussing state feedback and closed-loop systems.
In this form, the state matrix is a diagonal matrix of its (non-repeated) eigenvalues. The control has a unitary influence on each eigenspace, and the output is a linear combination of the contributions from the eigenspaces (where the weights are the complex residuals at each pole).
This "almost diagonal" form handles the case where eigenvalues are repeated. The repeated eigenvalues represent a multi-dimensional eigenspace, and so the control only enters the eigenspace once and it's integrated through the other states of that small subsystem.
This operation can be performed using this MATLAB command:
Moving from one companion form to the other usually involves elementary operations on matrices and vectors (e.g., transposes or interchanging rows). Given a vector with the coefficients of a characteristic polynomial, MATLAB can compute a companion form with the coefficients in the top row (there are other 3 possible companion forms not generated by that function)
Given another vector with the coefficients of a transfer function's numerator polynomial, the canon command can do the same.
We are given a system that is described by the transfer function:
and are now tasked to obtain the state-space matrixes in control canonical form. We first note that the order of the numerator is 2, while the corresponding order is 3 in the denominator. This means that we will not have any feed-forward and thus, the scalar D is 0.
We now split the transfer function into two factors:
We then retrieve the time-domain description,
We now create two new states that describe all these derivatives. Since the highest order of the system is 3 (in the denominator of TF), we must create 2 new states, so that we have 3 states in total.
We substitute the new states into the equation above:
Now we evaluate the input of the system in a similar manner:
Note that the first term is a third derivative. We can now insert our new states into the above equation:
We move the derivative of the third state to the left side and get:
We are now ready to rewrite these equations in the state-space form. We start by moving the input to the right side of the equation so that we have an expression for each state.