Control Systems/Controllability and Observability
In the world of control engineering, there are a slew of systems available that need to be controlled. The task of a control engineer is to design controller and compensator units to interact with these pre-existing systems. However, some systems simply cannot be controlled (or, more often, cannot be controlled in specific ways). The concept of controllability refers to the ability of a controller to arbitrarily alter the functionality of the system plant.
The state-variable of a system, x, represents the internal workings of the system that can be separate from the regular input-output relationship of the system. This also needs to be measured, or observed. The term observability describes whether the internal state variables of the system can be externally measured.
Complete state controllability (or simply controllability if no other context is given) describes the ability of an external input to move the internal state of a system from any initial state to any other final state in a finite time interval
We will start off with the definitions of the term controllability, and the related terms reachability and stabilizability.
- A system with internal state vector x is called controllable if and only if the system states can be changed by changing the system input.
- A particular state x1 is called reachable if there exists an input that transfers the state of the system from the initial state x0 to x1 in some finite time interval [t0, t).
- A system is Stabilizable if all states that cannot be reached decay to zero asymptotically.
We can also write out the definition of reachability more precisely:
A state x1 is called reachable at time t1 if for some finite initial time t0 there exists an input u(t) that transfers the state x(t) from the origin at t0 to x1.
A system is reachable at time t1 if every state x1 in the state-space is reachable at time t1.
Similarly, we can more precisely define the concept of controllability:
A state x0 is controllable at time t0 if for some finite time t1 there exists an input u(t) that transfers the state x(t) from x0 to the origin at time t1.
A system is called controllable at time t0 if every state x0 in the state-space is controllable.
For LTI (linear time-invariant) systems, a system is reachable if and only if its controllability matrix, ζ, has a full row rank of p, where p is the dimension of the matrix A, and p × q is the dimension of matrix B.
A system is controllable or "Controllable to the origin" when any state x1 can be driven to the zero state x = 0 in a finite number of steps.
A system is controllable when the rank of the system matrix A is p, and the rank of the controllability matrix is equal to:
If the second equation is not satisfied, the system is not .
MATLAB allows one to easily create the controllability matrix with the ctrb command. To create the controllability matrix simply type
where A and B are mentioned above. Then in order to determine if the system is controllable or not one can use the rank command to determine if it has full rank.
Then controllability does not imply reachability.
- Reachability always implies controllability.
- Controllability only implies reachability when the state transition matrix is nonsingular.
There are four methods that can be used to determine if a system is reachable or not:
- If the p rows of are linearly independent over the field of complex numbers. That is, if the rank of the product of those two matrices is equal to p for all values of t and τ
- If the rank of the controllability matrix is the same as the rank of the system matrix A.
- If the rank of for all eigenvalues λ of the matrix A.
- If the rank of the reachability gramian (described below) is equal to the rank of the system matrix A.
Each one of these conditions is both necessary and sufficient. If any one test fails, all the tests will fail, and the system is not reachable. If any test is positive, then all the tests will be positive, and the system is reachable.
Gramians are complicated mathematical functions that can be used to determine specific things about a system. For instance, we can use gramians to determine whether a system is controllable or reachable. Gramians, because they are more complicated than other methods, are typically only used when other methods of analyzing a system fail (or are too difficult).
All the gramians presented on this page are all matrices with dimension p × p (the same size as the system matrix A).
All the gramians presented here will be described using the general case of Linear time-variant systems. To change these into LTI (time-invariant equations), the following substitutions can be used:
Where we are using the notation X' to denote the transpose of a matrix X (as opposed to the traditional notation XT).
We can define the reachability gramian as the following integral:
The system is reachable if the rank of the reachability gramian is the same as the rank of the system matrix:
We can define the controllability gramian of a system (A, B) as:
The system is controllable if the rank of the controllability gramian is the same as the rank of the system matrix:
If the system is time-invariant, there are two important points to be made. First, the reachability gramian and the controllability gramian reduce to be the same equation. Therefore, for LTI systems, if we have found one gramian, then we automatically know both gramians. Second, the controllability gramian can also be found as the solution to the following Lyapunov equation:
Many software packages, notably MATLAB, have functions to solve the Lyapunov equation. By using this last relation, we can also solve for the controllability gramian using these existing functions.
The state-variables of a system might not be able to be measured for any of the following reasons:
- The location of the particular state variable might not be physically accessible (a capacitor or a spring, for instance).
- There are no appropriate instruments to measure the state variable, or the state-variable might be measured in units for which there does not exist any measurement device.
- The state-variable is a derived "dummy" variable that has no physical meaning.
If things cannot be directly observed, for any of the reasons above, it can be necessary to calculate or estimate the values of the internal state variables, using only the input/output relation of the system, and the output history of the system from the starting time. In other words, we must ask whether or not it is possible to determine what the inside of the system (the internal system states) is like, by only observing the outside performance of the system (input and output)? We can provide the following formal definition of mathematical observability:
- A system with an initial state, is observable if and only if the value of the initial state can be determined from the system output y(t) that has been observed through the time interval . If the initial state cannot be so determined, the system is unobservable.
- Complete Observability
- A system is said to be completely observable if all the possible initial states of the system can be observed. Systems that fail this criteria are said to be unobservable.
- A system is Detectable if all states that cannot be observed decay to zero asymptotically.
- A system is constructable if the present state of the system can be determined from the present and past outputs and inputs to the system. If a system is observable, then it is also constructable. The relationship does not work the other way around.
A system state xi is unobservable at a given time ti if the zero-input response of the system is zero for all time t. If a system is observable, then the only state that produces a zero output for all time is the zero state. We can use this concept to define the term state-observability.
- A system is completely state-observable at time t0 or the pair (A, C) is observable at t0 if the only state that is unobservable at t0 is the zero state x = 0.
A state x is unconstructable at a time t1 if for every finite time t < t1 the zero input response of the system is zero for all time t.
A system is completely state constructable at time t1 if the only state x that is unconstructable at t0 is x = 0.
If a system is observable at an initial time t0, then it is constructable at some time t > t0, if it is constructable at t1.
The observability of the system is dependent only on the system states and the system output, so we can simplify our state equations to remove the input terms:
A: p × p
B: p × q
C: r × p
D: r × q
Therefore, we can show that the observability of the system is dependent only on the coefficient matrices A and C. We can show precisely how to determine whether a system is observable, using only these two matrices. If we have the observability matrix Q:
we can show that the system is observable if and only if the Q matrix has a rank of p. Notice that the Q matrix has the dimensions pr × p.
MATLAB allows one to easily create the observability matrix with the obsv command. To create the observability matrix simply type
where A and C are mentioned above. Then in order to determine if the system is observable or not one can use the rank command to determine if it has full rank.
We can define an observability gramian as:
A system is completely state observable at time t0 < t < t1 if and only if the rank of the observability gramian is equal to the size p of the system matrix A.
If the system (A, B, C, D) is time-invariant, we can construct the observability gramian as the solution to the Lyapunov equation:
We can define a constructability gramian as:
A system is completely state observable at an initial time t0 if and only if there exists a finite t1 such that:
Notice that the constructability and observability gramians are very similar, and typically they can both be calculated at the same time, only substituting in different values into the state-transition matrix.
The concepts of controllability and observability are very similar. In fact, there is a concrete relationship between the two. We can say that a system (A, B) is controllable if and only if the system (A', C, B', D) is observable. This fact can be proven by plugging A' in for A, and B' in for C into the observability Gramian. The resulting equation will exactly mirror the formula for the controllability gramian, implying that the two results are the same.