Scroll back to top

    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 and the input ):

    • is the output.

    Like the state and the input, the output is a function of time — we will write when we want to make the time-dependence explicit — and may have more than one element, so is in general a vector (represented by a matrix of numbers). Suppose, in particular, that

    • the output has elements.

    Then, we would represent it as a column matrix:

    Like and , the constants and have to be matrices:

    • is a constant matrix of size .
    • is a constant matrix of size .

    The state-space model remains both linear and time-invariant, because is a linear function of and and because and are constant.

    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.

    Heads up!

    As usual, other people may use other symbols for both the variables and constants in a state-space model. For example:

    This is also a “state-space model,” in which the state is , the input is , and the output is .

    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 is a vector of sensor measurements. It is a function of time and can have more than one element — so, just like and , it should be represented as a column matrix. Just like the function that describes the dynamic model, the function that describes the sensor model will often be nonlinear.

    Step 2. Define the output as follows:

    Note that measures the difference between what the sensor measurements are and what these measurements would be if the system were at equilibrium. In particular, the output is zero when the system is at equilibrium even if the measurements are not.

    Step 3. Compute and as follows:

    Why does this make sense? Just like we took a first-order Taylor’s series expansion about to approximate the function that describes the dynamic model, let’s take a first-order series expansion about to approximate the function that describes the sensor model:

    So, with this choice of and , we have produced a linear approximation

    to the nonlinear sensor model

    that is accurate near the equilibrium point.

    Heads up!

    We could define the variable

    to represent, more concisely, what the sensor measurements would be if the system were at equilibrium. With this new variable, we could define the output more simply as

    It is important to understand, however, that is not an “equilibrium value” in the same way that and are. The key difference is that and are chosen, while is computed (by evaluating the function at and ).

    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 , i.e., as a vector-valued function of and :

    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 and by taking Jacobians:

    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 by 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 , i.e., as a vector-valued function of and :

    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 and by taking Jacobians:

    The resulting state-space model is

    Heads up!

    In both of the previous two examples, we found that . This is often (but not always) the case, so — from time to time — we may just write

    instead of

    when describing a sensor model in state-space form.