The basic idea behind state space control is to use the state of the system in order to set the input. Namely, if we are given
Notice that if our system is in phase variable form, then the controlled state-evolution equation is
Design by Transformation
Suppose we have a system
Since our transformation is invertible, the controllability of the system is unchanged, so
Observers/State Estimators
Now, if we we do state feedback using the estimated state, then
Looking at the combined system,
Integrators in State Feedback
Suppose we wanted to get rid of the steady state error using state-space control. We would do this using an integrator over the error in the observed outputs.
If we treat this as a new state, its evolution will be
This makes it very convenient to place our poles where we want since the last row of the A matrix is also the coefficients of the characteristic polynomial.
dtdz=Az+Buy=Cz
which is not in phase variable form. To place it into phase variable form, first assume that z=Px for some invertible matrix P.
Pdtdx=APx+Bu⟹dtdx+P−1Buy=CPx.
Cx=[P−1BP−1AB⋯P−1An−1B]=P−1Cz.
Assuming the system is controllable, P=CzCx−1. Now we can apply state feedback to the phase variable system.
When doing state feedback, we often don’t have access to the states themselves because we only have access to y. In that case, we can’t use u=r−Kx because we don’t know x. One idea is to keep track of an estimated state x^ and estimated output y^ which follow the same system dynamics as the actual state and the actual output and receive the same input. If A is a stable matrix, then limt→∞eAtx0=0 where x0 is the initial state of the system. This means that even if there is a discrepancy between the estimated state and the true state in the beginning, the estimate will match the true state after some time.
Suppose now that we want to control the error between the true state and the estimated state e=x−x^, so we add a gain L to the error in the outputs y−y^.
Thus we can design L to get quick error convergence. Notice that if our system is not observable, then we will not be able to place the poles of the observer system where we want them to be.
dtdx=Ax+B(r−Kx^)=(A−BK)x+B(r−Ke).
[dtdxdtde]=[A−BK0−BKA−LC][xe]+[B0]r.
Notice that the poles of this system are just the poles of the original system and the poles of the observer system, so we can choose K and L independently.
xN=∫0t(r−y)dt.
dtdxN=r−Cx.
If our new control law is u=−Kx+KexN, then our new state-space equations are
[dtdxdtdxN]=[A−C00][xxN]+[B0]+[0I]r.
[dtdxdtdxN]=[A−BK−CBKe0][xxN]+[0I]r.
Suppose we want to control our system to send the state to 0 over an infinite time horizon using the input −Kx. We want to do this by optimizing a cost function that penalizes control effort and the state error. In particular, we want to minimize the cost function
J=∫0∞yTQy+uTRudt.
where R and Q are positve-semi-definite matrices (typically diagonal) and determine how much we penalize the error and the control effort.