Welcome to the video introducing state estimation.
As mentioned in the previous video,
state feedback control design as studied in the previous section requires that you have access to the complete state vector. This is rarely the case. It is usually expensive to measure all states, and sometimes it might be impossible to measure certain quantities. Either it's not physically possible to fit a sensor or there might not be such a sensor available at all. In this video we will introduce state estimation as a way to get access to the state variables. The concept is in the automotive industry, sometimes referred to as soft sensors. In other words, we use software to get access to the quantity that we would like to measure instead of hardware. If we recall the idea with state feedback control, it was to modify the eigenvalues by using the input or control signal.
the closed loop state feedback control system
can be visualized using a block diagram. As we can see, the state vector is fed back to form the stabilizing controller. A problem is that we must have access to the complete state vector for producing our control action. The idea of state estimation is to design something called an observer that tries to provide an estimate of the states. The observer is fed with the same input as the real pant. We can if we like also add feedback measurements from the output.
The goal of the observer is to provide a replica
of the true state vector. In other words, we will like to make the error between the estimated states and the true state zero.
Let's start with a simple way of estimating,
called an open loop observer. The idea is to use a copy of the model. The open loop observer is not using any feedback from the output. So we can remove that signal. So the observer becomes equal to the plant model. Is it a good and realistic observer? Let's analyze the error dynamics by differentiating the estimation error. As we can see, the error is an autonomous system with system matrix equal to the plant's system matrix. This autonomous system has the following solution as we remember from the first section. So it depends on the initial condition of the observer and the characteristics of the system matrix. If we studied the performance of the system using simulations we can see that it's working fine if the system is stable, in other words, if the A matrix has negative eigenvalues. But what happens if the system is unstable? We can notice that it will not drive the error to zero as desired.
So we require the system to be stable
if we would like to use an open observer, which is limiting its applicability. So why not try to use measurements from the plant? We call such state estimators closed loop observers or closed loop estimates. So let's compare the estimated output with the measured output, and then feed the error back to the observer via the feedback gain. We usually call the feedback gain the estimator gain. Combining it with the open loop observer then gives the following closed loop observer. You probably already see the similarities with state feedback design. So let's start analyzing the observer by studying the estimator error. Plugging in the system equations gives an autonomous system, which depends on the system matrix and the estimate to gain and the output matrix. This gives us the freedom to form the error dynamics using the estimator gain L. So it is a design parameter, which we have the possibility to choose in order to shape the error dynamics under some conditions called observability. This condition will be the focus in the next video. So how will the closed loop estimator perform in simulations? We can see that it's working well if the system is stable, in other words, if A has negative eigenvalues again. And it works well if the system is unstable as well. We should notice that the estimator gain only stabilizes the estimation error, not the system. How do we choose the estimator gain? It is actually very similar to state feedback design. The objective is to choose the estimator gain L, such that the estimator converges to the true states values within a certain specified time. And we do this by selecting the closed loop error dynamic poles. The poles are the roots to the characteristic polynomial. And as we have L, we have some degrees of freedom to make this selection. And from state feedback design we have learned, for example, pole placement design. So we can use that for estimator design as well. I would like to mention that estimation is a concept on its own. Let's look at an example, the example of vehicle steering used in the previous videos. In this example I have used some numerical values. The vehicle is, for example, traveling with a speed of 12 meters per second. The idea is to design a state estimator that estimates the vehicle's states, the lateral position and the heading angle based on measurements of the lateral position. The specification of the estimation error dynamics is to have two real poles in minus 4 and minus 6. We use the standard closed loop estimator formulation. The estimation error dynamics is given as. And if we plug in the system matrices, we get-- and this is the closed loop error dynamics where we have the possibility to shape the dynamics using the parameters L1 and L2. To make the pole placement design, we need to determine the characteristic polynomial for the observer. And we do that by computing the determinant. And if we match it with the desired characteristic polynomial we can determine the values of the observer parameters. So the estimator can then be written out as the model plus the feedback from the error between the measured output and the estimated output. So how does the estimator perform?
Simulating it in Simulink using a sinusoidal input
to the system, and we would like to study if the observer is able to reproduce the truth states. In the simulations, the true states are plotted in blue and the estimates are given in red. And from the simulations we can conclude that the observer is working nicely after some transients due to uncertainty in the initial position and heading angle of the vehicle. Let's change the measurement from the lateral position to the heading angle. Will we still be able to design a state estimator? The setup is the same as in the previous example, with the exception of the measurement. We do the design in the same way, ending up with closed loop error dynamics looking like this. The characteristic polynomial for the observer is computed in order to make the pole placement design as before. So trying to match it with the desired characteristic polynomial, we see that it's not possible to shape the error dynamics as we would like. We say that the system is unobservable or have an unobservable mode in terms of the unselected eigenvalue.
Now we have developed the state estimator.
The next step in the design is to use the estimated states for feedback. From a software point of view, our controller is now not only this feedback part, but also the estimator part. So the complete enclosed area is now our controller. Given the system model, the controller and the observer, we can determine the closed loop system dynamics. Looking at this system model we can notice that the poles of the closed loop system is given by the poles of the state feedback system, and the poles of the state estimator. And in fact they are separated, so we can choose them freely and separated from each other. This means that we can design the state feedback controller based on the assumption that we have access to the complete state vector. And then we design the state estimator to get access to the state vector. Furthermore, if the system is reachable and observable, the poles of the closed loop system can be chosen arbitrarily. A rule of thumb is to make the estimator poles faster than the feedback poles. And we place them four to five times faster than the fastest pole of the feedback. Let's one more time revisit the vehicle steering example, where we put the state feedback controller that we designed in the previous video together with the observer designed earlier in this video and study the closed loop performance. The feedback poles are placed at minus 1, a double pole, and the observer's poles are four times faster. The simulations, representing a lateral movement of the vehicle and then back again. And from the simulations we can see that the system is working quite good. We have some transients in the beginning due to uncertainties in the initial conditions. But otherwise it's working fine. Some final comments on control design and implementation-- our design methods for developing the controllers have been made in continuous time. But we usually have a computer to implement the control algorithms. Looking at the system depicted in this figure, we have the plant, including the system, the actuators and the sensors. Then we have the controller, including the A/D and D/A converters and the computer. And it is in the computer we implement our controllers. As mentioned before, our controller consists of the feedback part and the estimator part. And this is what we need to implement. To be able to implement the observer, we need to discretize the state derivatives. And we can do that by using a difference method, for example, an Euler method. Then we can rewrite the estimator as a difference equation that is suitable for implementation. So we can end up with this very simple computer program for our controller. First we're reading the reference signal and the measured outputs, then we compute the control action needed, and then we send it to the plant. After this we update our state estimator. And then we run the program over and over again with a loop time determined by the sampling time. So in this video we have developed another tool to make it possible to use state feedback controllers, namely state estimation design. We have also looked upon implementation of our control system. The estimator design is dependent on the concept of observability. So that will be the topic for the next video. Thank you for watching and goodbye for now.