Contents
- PID
- State space models
- The matrix exponential function
- Asymptotic stability
- Eigenvalue placement by controllable canonical form
- Optimization and optimal control
- State estimation
- Optimal observer design
- Reference tracking
PID
The proportional-integral-derivative or PID controller is a simple, widely-used, and often very effective way to make a dynamic system do what you want.
Suppose this dynamic system has exactly one real-valued input
The PID controller is
for some choice of constant gains
How to compute the proportional feedback term
We assume the controller is given
is just arithmetic.
How to compute the integral feedback term
To compute the term
we need to find the integral
at the current time
for some time step
Here is another way of thinking about this. Suppose we define a new variable
to contain the integral of the error. It is equivalent to say that
with the initial condition
Then, it is common to use the backward Euler method
to compute an approximation to
To implement the backward Euler method with code, you need to define a variable to store the prior value
How to compute the derivative feedback term
To compute the term
we need to find the derivative
at the current time
To implement the backward finite difference method with code, you need to define a variable to store the prior value
State space models
What is a state space model?
A state-space model is a set of ordinary differential equations that can be written in this form:
There are two variables:
is the state is the input
Both variables are functions of time, so we could have written
The state and input may have more than one element — that is to say, they may be vectors (represented by a matrix of numbers) and not scalars (represented by a single number). Suppose, in particular, that:
- the state
has elements - the input
has elements
Then, we would represent them as column matrices:
Taking the time derivative of a matrix is equivalent to taking the time derivative of each element of that matrix, so we would write
The state-space model also has two constants:
is a constant matrix of size is a constant matrix of size
The state space model has two key properties:
- it is linear because both
is a linear function of and - it is time-invariant because
and are constant
How do I put a system in state space form?
Suppose we are given a description of a dynamic system. We would like to describe this same system with a state space model.
Remember that every state space model is linear. The equations of motion that describe a dynamic system are often nonlinear. So apparently, we will have to accept that state space models can only approximate some of the systems we want to describe.
We will use linearization to arrive at this approximation, in four steps.
Step 1. Rewrite the system as a set of first-order ordinary differential equations:
In this expression, the variables
Step 2. Find an equilibrium point
A solution to this equation is called an equilibrium point because if
then
and so
This equation may have no solutions, in which case no equilibrium point exists for the system. This is bad. We will ignore this situation for now.
This equation also may have many solutions, in which case you have to make a choice. A good choice is whatever equilibrium point you would like your system to achieve.
Step 3. Define the state and input as follows:
Note that
Step 4. Compute
Why does this make any sense? Look again at the ODEs that describe the original system:
First, because
then
So the left-hand side of the ODEs can simply be replaced with
Now, suppose we want a linear approximation to the right-hand side of the ODEs — the function
There you have it: “
Example (first-order)
Consider the system with dynamics that are described by the following equation of motion:
Let’s apply our method to put this system in state space form.
We begin by rewriting it as a set of first-order ODEs. Lucky us, the system is already described by just one first-order ODE, so all we need to do is solve for
Next, we find an equilibrium point by solving
In this case, there are many solutions. Suppose we pick this one:
Then, we define the state and input based on this choice of equilibrium point:
Finally, we compute
The resulting state space model is
Note that the original system was linear, so there was no approximation here. We could probably have skipped most of these steps and written the system in state-space form by inspection. On the other hand, it is nice to know that the process of “linearization” still works even in this simple case.
Example (second-order)
Consider the system with dynamics that are described by the following equation of motion:
Let’s apply our method to put this system in state-space form.
We begin by rewriting it as a set of first-order ODEs:
- We find the time-derivative of
with highest order — in this case, , of order 2. - We define new variables for each time-derivative of
with lower order — in this case, , the only time-derivative with order between 0 and 2. We might choose the following name for this time-derivative:
- We rewrite the original ODEs (in this case, just one) in terms of these new variables:
- We add one extra ODE for each new variable (in this case, just one extra) — this is trivial, coming from the way we defined these new variables:
- We collect the original ODEs and the extra ODEs together, if necessary solving for all of the time-derivatives (that’s not necessary here):
- Finally, we rewrite our result in the form
by collecting things in column matrices as follows:
Note that, as desired, these rewritten ODEs have time derivatives that are at most of first order. Also note that all of these time-derivatives are on the left-hand side of the equations — none appear on the right-hand side.
Next, we find an equilibrium point by solving
There are many solutions. Suppose we pick this one:
In this case, there are many solutions. Suppose we pick this one:
Then, we define the state and input based on this choice of equilibrium point:
Finally, we compute
The resulting state space model is
The original system was nonlinear and the state space model is linear, so there must be some approximation here! As we will see, this approximation is good near the equilibrium point but can be very bad elsewhere.
The matrix exponential function
What is the matrix exponential?
The matrix exponential of a square matrix
where
How do I use the matrix exponential to solve a linear system?
The solution to the set of linear ODEs
with the initial condition
is
How do we know that this solution is correct? First, let’s check that this solution satisfies the ODEs:
Apparently, it does. Second, let’s check that this solution satisfies the initial condition:
Again, it does. (We might wonder if this is the only solution to the original ODEs — it is, although a proof would require more work.)
How do I use the matrix exponential to solve state space models?
Consider the state space model
This model does not look the same as
Indeed, without specifying
and so we are right back at a linear system that can be solved with the matrix exponential. Another common choice of
for some constant matrix
and so — just like before — we are right back at a linear system that can be solved with the matrix exponential. Although this result will get us a long way, we will see how to solve state space models for other choices of input later on.
Asymptotic stability
What are eigenvalues and eigenvectors?
Consider a square matrix
then we call
One way to find eigenvalues is to solve the equation
where “
for
Apparently, if
How do I diagonalize a square matrix?
Suppose we have found the eigenvalues
with an eigenvector in each column, and also the matrix
with the eigenvalues along the diagonal.
Two things are true.
First, the following equality holds:
You could easily verify this result for yourself.
Second, if
The key consequence of
In this case — if all eigenvalues are distinct and so the matrix of eigenvectors is invertible — we say that
What is the matrix exponential of a diagonal matrix?
It is easy to find the matrix exponential of a diagonal matrix, starting from the definition:
What is the solution to a linear system that is diagonalizable?
We have seen that the solution to
with the initial condition
is
Suppose
where
is a diagonal matrix that contains the eigenvalues of
is a matrix of the corresponding eigenvectors. Then, applying the definition of matrix exponential again, we have
where the last step comes from what we just found out about the matrix exponential of a diagonal matrix. In this expression, the terms
that appear in the diagonal of
Therefore, we can infer the behavior of
Euler’s formula tells us that
Apparently, as time gets large, one of three things is true about each of these terms:
- if
, then grows quickly - if
, then is constant ( ) or is sinusoidal with constant magnitude ( ) - if
, then decays quickly to zero
It is possible to show that (more or less) the same result holds for any system
where
See the reference textbook for details.
When is a linear system asymptotically stable?
The system
is called asymptotically stable if
Based on our observations about the solution to linear systems that are diagonalizable, we can state the following important result:
In particular, we now have a test for whether or not a controller “works.” Suppose we apply linear state feedback
to the state space system
so that
The controller “works” when this system is asymptotically stable, i.e., when
We may not have a systematic way of finding a matrix
Eigenvalue placement by controllable canonical form
Apply the input
to the open-loop system
and you get the closed-loop system
Suppose we want to choose
This entire discussion will be based on the assumption that there is exactly one input (i.e., that
Eigenvalues are invariant to coordinate transformation
Consider the system
Suppose we define a new state variable
for some invertible matrix
by differentiation. We have called this process “coordinate transformation” — it is exactly the same process we used for diagonalization when establishing our result about asymptotic stability. Plug these two things into our original state-space model and we get
Solve for
Finding a solution
to the original system. We would like to know if these two solutions “behave” the same way. In particular, we would like to know if the eigenvalues of
First, let’s look at the eigenvalues of
Second, let’s look at the eigenvalues of
We can play a trick. Notice that
and so
It is a fact that
for any square matrices
It is another fact that
Applying this other fact, we find
In summary, we have established that
and so the eigenvalues of
to the transformed system and choose
to the original system, i.e., choosing
will result in placing the eigenvalues of
Controllable canonical form
In the previous section, we showed that eigenvalues are invariant to coordinate transformation. The next question is what coordinates are useful for control design. The answer to that question turns out to be something called controllable canonical form.
A system with
where
Notice that
is a matrix of size , is a matrix of size , is a vector of length , and is a vector of length .
It is a fact that the characteristic equation of this system is given by
It is easy to see that this formula is true for
- If
, then:
- If
, then:
There are a variety of ways to prove that this same formula is true in general. Applying the general formula to compute the matrix determinant, for example, we would find:
where each matrix
Plug this in, and our result follows. Now, the reason that controllable canonical form is useful is that if we choose the input
for some choice of gains
then the “
The characteristic equation of this closed-loop system, computed in the same way as for
If you want this characteristic equation to look like
then it’s obvious what gains you should choose
So, if you have a system in controllable canonical form, then it is easy to choose gains that make the characteristic equation of the closed-loop system look like anything you want (i.e., to put the closed-loop eigenvalues anywhere you want). In other words, it is easy to do control design.
Putting a system in controllable canonical form
We have seen that controllable canonical form is useful. Now we’ll see how to put a system in this form. Suppose we have a system
and we want to choose an invertible matrix
then we can rewrite the system as
where
are in controllable canonical form. The trick is to look at the so-called controllability matrix that is associated with the transformed system:
We will talk more later about the controllability matrix — for now, notice that
You see the pattern here, I’m sure. The result is:
where
is the controllability matrix associated with the original system.
There are three things to note:
-
and are things that you know — you have a description of the original system, as always — so you can compute . -
and are also things that you know — the values in the top row of are the coefficients of the characteristic polynomial of the matrix — so you can compute . -
is a square matrix — it has columns , , and so forth, all of which have size . So, if has non-zero determinant, then you can find its inverse.
As a consequence, you can solve for the matrix
Now, suppose you design a control policy for the transformed system:
Remember, you can do this easily, because the transformed system is in controllable canonical form. We can compute the equivalent control policy, that would be applied to the original system:
In particular, if we choose
then we get the behavior that we want.
Again, we emphasize that this only works if
A systematic process for control design
Apply the input
to the open-loop system
and you get the closed-loop system
Suppose we want to choose
Using the results of the previous sections, we know we can do this as follows:
- Compute the characteristic equation that we want:
- Compute the characteristic equation that we have:
- Compute the controllability matrix of the original system (and check that
):
- Compute the controllability matrix of the transformed system:
where
- Compute the gains for the transformed system:
- Compute the gains for the original system:
And we’re done!
This process is easy to implement, without any symbolic computation.
Remember, although this method only works for systems with exactly one input (i.e., when
How to decide when eigenvalue placement is possible
We say that a system is controllable if eigenvalue placement is possible. We have seen eigenvalue placement with Ackermann’s method (for the special case when
Let’s break this statement down.
First, suppose there is only one input, so
Now, suppose there is more than one input, so
If
We can actually say a little more than this. It turns out that if the controllability matrix
Optimization and optimal control
These notes were originally written by T. Bretl and were transcribed here by S. Bout.
Optimization
The following thing is called an optimization problem:
The solution to this problem is the value of
-
We know that we are supposed to choose a value of
because “ ” appears underneath the “minimize” statement. We call the decision variable. -
We know that we are supposed to minimize
because “ ” appears to the right of the “minimize” statement. We call the cost function.
In particular, the solution to this problem is
-
We could plot the cost function. It is clear from the plot that the minimum is at
. -
We could apply the first derivative test. We compute the first derivative:
Then, we set the first derivative equal to zero and solve for
:Values of
that satisfy the first derivative test are only “candidates” for optimality—they could be maxima instead of minima, or could be only one of many minima. We’ll ignore this distinction for now. Here’s a plot of the cost function and of it’s derivative. Note that, clearly, the derivative is equal to zero when the cost function is minimized:
In general, we write optimization problems like this:
Again,
Here is another example:
The solution to this problem is the value of both
Second, there are two decision variables instead of one. But again, there are at least two ways of finding the solution to this problem:
-
We could plot the cost function. The plot is now 3D—the “x” and “y” axes are
and , and the “z” axis is . The shape of the plot is a bowl. It’s hard to tell where the minimum is from looking at the bowl, so I’ve also plotted contours of the cost function underneath. “Contours” are like the lines on a topographic map. From the contours, it looks like the minimum is at . -
We could apply the first derivative test. We compute the partial derivative of
with respect to both and :Then, we set both partial derivatives equal to zero and solve for
and :As before, we would have to apply a further test in order to verify that this choice of
is actually a minimum. But it is certainly consistent with what we observed above. Here is a plot of each partial derivative as a function of and . The shape of each plot is a plane (i.e., a flat surface). Both planes are zero at :
An equivalent way of stating this same optimization problem would have been as follows:
You can check that the cost function shown above is the same as the cost function we saw before (e.g., by multiplying it out). We could have gone farther and stated the problem as follows:
We have returned to having just one decision variable
This example is exactly
the same as the previous example, except that the two decision variables
(now renamed
Then, we plug this result into the cost function:
By doing so, we have shown that solving the constrained optimization problem
is equivalent to solving the unconstrained optimization problem
and then taking
The point here was not to show how to solve constrained optimization problems in general, but rather to identify the different parts of a problem of this type. As a quick note, you will sometimes see the example optimization problem we’ve been considering written as
The meaning is exactly
the same, but
“Among all choices of
for which there exists an satisfying , find the one that minimizes .”
Minimum vs. Minimizer
We have seen three example problems. In each case, we were looking for the minimizer, i.e., the choice of decision variable that made the cost function as small as possible:
-
The solution to
was
. -
The solution to
was
. -
The solution to
was
.
It is sometimes useful to focus on the minimum instead of on the minimizer, i.e., what the “smallest value” was that we were able to achieve. When focusing on the minimum, we often use the following “set notation” instead:
-
The problem
is rewritten
The meaning is—find the minimum value of
over all choices of . The solution to this problem can be found by plugging in what we already know is the minimizer, . In particular, we find that the solution is . -
The problem
is rewritten
Again, the meaning is—find the minimum value of
over all choices of and . We plug in what we already know is the minimizer to find the solution—it is . -
The problem
is rewritten
And again, the meaning is—find the minimum value of
over all choices of for which there exists satisfying . Plug in the known minimizer, , and we find that the solution is 15.
The important thing here is to understand the notation and to understand the difference between a “minimum” and a “minimizer.”
Optimal Control
Statement of the problem
The following thing is called an optimal control problem:
Let’s try to understand what it means.
-
The statement
says that we are being asked to choose an input trajectory
that minimizes something. Unlike in the optimization problems we saw before, the decision variable in this problem is a function of time. The notation is one way of indicating this. Given an initial time and a final time , we are being asked to choose the value of at all times in between, i.e., for all . -
The statement
is a constraint. It implies that we are restricted to choices of
for which there exists an satisfying a given initial conditionand satisfying the ordinary differential equation
One example of an ordinary differential equation that looks like this is our usual description of a system in state-space form:
-
The statement
says what we are trying to minimize—it is the cost function in this problem. Notice that the cost function depends on both
and . Part of it— —is integrated (i.e., “added up”) over time. Part of it— —is applied only at the final time. One example of a cost function that looks like this is
The HJB equation (our new “first-derivative test”)
As usual, there are a variety of ways to solve an optimal control problem. One way is by application of what is called the Hamilton-Jacobi-Bellman Equation, or “HJB.” This equation is to optimal control what the first-derivative test is to optimization. To derive it, we will first rewrite the optimal control problem in “minimum form” (see “Minimum vs Minimizer”):
Nothing has changed here, we’re just asking for the minimum and not the minimizer. Next, rather than solve this problem outright, we will first state a slightly different problem:
The two changes that I made to go from the original problem to this one are:
-
Make the initial time arbitrary (calling it
instead of ). -
Make the initial state arbitrary (calling it
instead of ).
I also made three changes in notation. First, I switched from
You should think of the problem (2)
as a function itself. In goes an initial time
We call
The reason this equation is called a “recursion” is that
it expresses the function
from the first part and the cost
from the second part (where “
We now proceed to approximate the terms in (4) by first-order series expansions. In particular, we have
and we also have
If we plug both of these into (4), we find
Notice that nothing inside the minimum depends on anything other than
Also, notice that
does not depend
on
To simplify further, we can
subtract
The equation is called the Hamilton-Jacobi-Bellman Equation, or simply the HJB equation. As you can see, it is a partial differential equation, so it needs a boundary condition. This is easy to obtain. In particular, going all the way back to the definition (3), we find that
The importance of HJB is that if you can find a
solution to (5)-(6))—that is, if you can find a function
Solution approach
The optimal control problem
can be solved in two steps:
-
Find
: -
Find
:
LQR
Statement of the problem
Here is the linear quadratic regulator (LQR) problem:
It is an optimal control problem—if you define
then you see that this problem has the same form as (1). It is
called “linear” because the dynamics are those of a linear (state space)
system. It is called “quadratic” because the cost is quadratic (i.e.,
polynomial of order at most two) in
The matrices
What this notation
means is that
Do the matrices , , and really have to be symmetric?
Suppose
First, notice that
In fact,
Second, notice that we can replace
So, it is not that
Solution to the problem
Our “Solution approach” tells us to solve the LQR problem in two steps.
First, we find a function
What function
This function has the form
for some symmetric matrix
This is matrix calculus (e.g., see https://en.wikipedia.org/wiki/Matrix_calculus or Chapter A.4.1 of http://web.stanford.edu/~boyd/cvxbook/bv_cvxbook.pdf). The result on the left should surprise no one. The result on the right is the matrix equivalent of
You could check that this result is correct by considering an example. Plug these partial derivatives into HJB and we have
To evaluate the minimum, we apply the first-derivative test (more matrix calculus!):
This equation is easily solved:
Plugging this back into (7), we have
In order for this equation to be true for any
In summary, we have found that
solves the HJB equation, where
backward in time, starting from
Now that we know
for
LQR Code
Here is how to find the solution to an LQR problem with Python:
import numpy as np
from scipy import linalg
def lqr(A, B, Q, R):
# Find the cost matrix
P = linalg.solve_continuous_are(A, B, Q, R)
# Find the gain matrix
K = linalg.inv(R) @ B.T @ P
return K
State estimation
What is a state-space model with output?
All state-space models we have seen so far have had this form:
From now on, we will consider state-space models with this form instead:
We have added one more variable (along with the state
is the output.
Like the state and the input, the output is a function of time — we will write
- the output
has elements.
Then, we would represent it as a column matrix:
Like
is a constant matrix of size . is a constant matrix of size .
The state-space model remains both linear and time-invariant, because
Outputs can be used to model a variety of different things. We will use them to model sensor measurements for the purpose of state estimation.
How do I linearize a sensor model?
You already know how to linearize a dynamic model:
- Rewrite the dynamic model as a set of first-order ODEs:
- Choose an equilibrium point
among the solutions to this equation:
- Define the state and input in terms of the equilibrium point:
- Compute
and as the Jacobian of with respect to and respectively, evaluated at the equilibrium point:
The result is a linear approximation
to the nonlinear dynamic model
that is accurate near the equilibrium point.
We can use the same process to linearize a sensor model:
Step 1. Rewrite the sensor model as follows:
In this expression, the variable
Step 2. Define the output as follows:
Note that
Step 3. Compute
Why does this make sense? Just like we took a first-order Taylor’s series expansion about
So, with this choice of
to the nonlinear sensor model
that is accurate near the equilibrium point.
Example (linear sensor model)
Consider again a system with the following dynamic model:
We already showed how to rewrite this dynamic model as
and how to linearize it about the equilibrium point
to produce the state-space model
where
and
Now suppose we have sensors that allow the measurement of
Let’s apply our method to put this measurement in state-space form.
First, we rewrite the measurement in the form
Then, we define the output as the difference between the value of this function and what the value would be at equilibrium:
Finally, we compute
The resulting state-space model is
Note that the original sensor model was linear, so there was no approximation here. We could probably have skipped the entire process of linearization and written the system in state-space form bny inspection. However, just as was true when putting dynamic models in state-space form (see example), it is nice to know that “linearization” still works even in this simple case.
Example (nonlinear sensor model)
Consider a system with the same dynamic model as before, but now suppose we have sensors that allow the measurement of
Again, let’s apply our method to put this measurement in state-space form.
First, we rewrite the measurement in the form
Then, we define the output as the difference between the value of this function and what the value would be at equilibrium:
Finally, we compute
The resulting state-space model is
Optimal observer design
These notes were originally written by T. Bretl and were transcribed for this reference page by S. Bout.
Statement of the problem
Here is the deterministic, finite-horizon, continuous-time Kalman Filter (KF) problem—i.e., the optimal control problem that one would solve to produce an optimal observer:
The interpretation of this problem is
as follows. The current time is
The matrices
Just as
with the LQR problem, this notation means that
By plugging in the expression for
It is an optimal control problem, just like LQR—if you define
then you see that this problem has the general form
There are four differences between this form and the one we saw when solving the LQR problem:
-
The “input” in this problem is
, not . -
The “current time” is
and not . -
The final state—i.e., the state at the current time—is not given. Indeed, the point here is to choose a final state
that best explains and . -
The functions
, , and vary with time (because they have parameters in them— and —that are functions of time).
Because of these four differences, the HJB equation for a problem of this form is
Note the change in sign of both the first term outside the minimum and
the first term inside the minimum—this is because we are effectively
solving an optimal control problem in which time flows backward (from
the current time
Solution to the problem
As usual, our first step is to find a function
Expand the boundary condition:
This function has the form
for some symmetric matrix
Let’s “guess” that this form of
Here again—just as for LQR—we are applying matrix calculus. Plug these partial derivatives into HJB and we have
To evaluate the minimum, we apply the first-derivative test (more matrix calculus!):
This equation is easily solved:
Plugging this back into (1), we have
where the last step is because
In order
for this equation to be true for any
In summary, we have found that
solves the HJB equation,
where
The optimal choice of state
estimate at time
We can find the solution to this problem by application of the first derivative test, with some matrix calculus:
implying that
Let’s call this solution
Suppose we take the time derivative of
this expression, plugging in what we found earlier for
For this equation to hold for any
Behold! This is our expression for an optimal observer, if we define
Finally, suppose we take the limit as
It is customary to write
these last two equations in a slightly different way. In particular,
suppose we pre- and post-multiply both sides of this last equation by
Then, we have
and
Summary
An optimal observer—a deterministic, infinite-horizon, continuous-time Kalman Filter—is given by
where
and
Comparison between LQR and KF (i.e., why you can use “LQR” in Python to compute an optimal observer)
An optimal controller is given by
where
and
An optimal observer is given by
where
and
Take the transpose of (5) and—remembering that
Take the transpose of (6)
and—remembering that
Compare (3) and (4) with (7) and (8). They are exactly the same if we make the following replacements:
-
replace
with -
replace
with -
replace
with -
replace
with -
replace
with
This is the reason why
L = lqr(A.T, C.T, linalg.inv(Ro), linalg.inv(Qo)).T
produces an optimal observer, just like
K = lqr(A, B, Qc, Rc)
produces an optimal controller. WWWWWOOOOOWWWWW!!!!!!! (See above for the code used to find the solution to an LQR problem with Python.)
Reference tracking
The controllers we have designed so far make the state converge to zero — that is, they make
Suppose we want the state to converge to something else — that is, to make
We will see that, under certain conditions, this is easy to do.
Reference tracking with full state feedback
Consider the dynamic model
where
where
Suppose we design linear state feedback
that would make the closed-loop system
asymptotically stable — that is, that would make
Denote the standard basis for
Suppose there is some index
That is, suppose the function
Invariance of equilibrium point. Since
then
Invariance of error in approximation of the dynamic model. The linear model
is an approximation to the nonlinear model
The amount of error in this approximation is
We will show that this approximation error is constant in — or, does not vary with — the
First, we show that the
Next, denote the columns of
Then, we compute
Now, for the approximation error:
What this means is that our state-space model is just as accurate near
Invariance of control. Suppose we implement linear state feedback with reference tracking:
where
for any
and note that
Second, we derive an expression for the closed-loop system in terms of this error:
This means that
or equivalently that
so long as all eigenvalues of
SUMMARY (reference tracking with full state feedback)
Consider a systemReference tracking with partial state feedback
Consider the system
where
where
Suppose we design a controller
and observer
that would make the closed-loop system
asymptotically stable — that is, that would make
where
Suppose, as for reference tracking with full state feedback, that there is some index
This implies invariance of equilibrium point and invariance of error in approximation of the dynamic model, just like before. Suppose it is also true that, for some constant vector
Then, the following two more things are true:
Invariance of error in approximation of the sensor model. The linear model
is an approximation to the nonlinear model
The amount of error in this approximation is
We will show that this approximation error is constant in — or, does not vary with — the
Next, denote the columns of
Then, we compute
Now, for the approximation error:
What this means is that our state-space model is just as accurate near
Invariance of control. Suppose we implement linear state feedback with reference tracking:
where
for any
and the state estimate error
Second, we derive an expression for the closed-loop system in terms of these errors. Let’s start with the state error:
Now, for the state estimate error:
Putting these together, we have
This means that
or equivalently that
so long as all eigenvalues of
SUMMARY (reference tracking with partial state feedback)
Consider a systemTracking more than one element of the state
Our discussion of reference tracking with full state feedback and with partial state feedback has assumed that we want to track desired values of exactly one element
In particular, suppose there are two indices
and, in the case of partial state feedback, that also satisfy
for constant vectors
would produce the same results that were derived previously.
Choosing the desired state to keep errors small
Our proof that tracking “works” relies largely on having shown that our state-space model is just as accurate near
Despite this fact, it is still important to keep the state error
small. The reason is that the input is proportional to the error — for full state feedback as
and for partial state feedback as
So, if error is large, the input may exceed bounds (e.g., limits on actuator torque). Since our state-space model does not include these bounds, it may be inaccurate when inputs are large.
As a consequence, it is important in practice to choose
remains small. Here is one common way to do this:
Choosing
Choosing