Up until now, our focus has been on developing the equations of the Gaussian sequential probabilistic inference solution, then applying those equations two linear state-space models in order to be able to estimate the state of the system that the model describes. The final method or algorithm that we developed is known as the linear Kalman filter. Specifically, this Kalman filter assumes of cell model, or set of equations of the type that is shown on the slide as you have seen many times before. The state of the model is equal to a linear combination of prior states, and a linear combination of prior inputs plus process noise. The output or measurement from the model is a linear combination of the present states and the present input and sensor noise. But as you know, battery cells are non-linear devices and so the models that describe battery cells must also be non-linear. Therefore, the Kalman filter equations do not apply directly. So, our approach going forward is to generalize the Kalman filter equations to the nonlinear case. We will need to change the way that we describe a state-space model of a system in order to allow for non-linear relationships. This is how we will do it. First, we will say that the present state is some non-linear function of the previous state, and the previous input, and the previous process noise. This is different from before where we said it was a linear combination of all these things. This non-linear function and the state equation can be very general, and all that we say about it here is that we are going to give it the name 'f'. Second, we say that the present output is equal to some non-linear function of the present state and the present input and the present sensor noise. Again, we're not going to say very much about this equation. It can be quite general. All that we will say is that we give it a name 'h'. We will be adapting this new non-linear model structure type to the enhanced self-correcting cell model that you learned about in the second course of the specialization. So, if you go back and review that material, you will see the direct comparison between the models that we develop there and this new functional form, and you should be able to guess right away, what we are going to use for the functions 'f' and the functions 'h'. In this model, the input 'u' will be the input current to the battery cell. The state 'x' will include the state of charge and the diffusion resistor currents in the dynamic hysteresis state value, and the output 'y' will be equal to cell voltage. In the general non-linear Kalman filter equations that we develop the functions 'f' and 'h' may be time varying, and in fact, they are as well for the models that we develop for battery cells. But we don't put any kind of indication in the notation that this is the case. For example, we might use 'f' subscript k to say that this is the functional form for 'f' at this point in time. But it makes the notation look very complicated. Just to make it a little bit cleaner looking, I will omit that subscript. You just know from context that these equations can be and often are time varying. When we seek to generalize the Kalman filter equations to non-linear systems, there are three basic approaches that people take. The first is known as the extended Kalman filter or EKF. This method performs an analytic linearization of the non-linear model equations at each point in time. By analytic, I mean that, we're doing math to come up with different model equations for every point in time, possibly using a pencil and paper, that kind of math using calculus and derivatives and things like that. We do this in order to come up with the equations that are linear approximations to the actual non-linear model. The EKF has some problems that we will talk about. But in many applications, it works quite well, and it's very popular approach to generalizing the Kalman filter approach to non-linear systems. The second major generalization of the Kalman Filter to non-linear systems is known as a sigma point Kalman filter, or sometimes as an unscented Kalman filter. The sigma point Kalman filter we call SPKF and the unscented Kalman filter we call the UKF. You'll find out that the UKF is really just a specific kind of sigma point Kalman filter and that there are other kinds as well. Both of these methods take the approach of statistical linearization or empirical linearization instead of analytic linearization. So, instead of using pencil and paper to come up with linearized approximations to the non-linear state equation and measurement equation at every point in time. Instead, we select different combinations of inputs, and we propagate those inputs through the model equations to come up with a linear approximation of the model at that point in time. This approach can provide much better results than EKF in some situations at least, and has the same computational complexity as the EKF. By that, I mean that the same number of floating point operations more or less are required to implement one iteration of the SPKF as is required to implement one iteration of the EKF. Computational complexity and conceptual complexity are very different. The conceptual complexity or the ease of understanding the SPK is probably worse. So, the EKF turns out to be more popular in practice, but you're going to learn all about both and so you can make an intelligent decision for any application regarding which you want to implement. The third basic type of generalization of the Kalman Filter to non-linear systems is known as a particle filter. Particle filters give the most precise estimates of a non-linear model state mostly because they don't make as many assumptions and the derivations as the other two methods do. But they are also often thousands of times more computationally complex than either the EKF or the SPKF. Meaning, every iteration of the filter, you require thousands of times more floating point operations. In this course, you will learn about the EKF this week, including how to derive it, how to implement it in Octave code, how to use that to evaluate the state of charge estimate for a battery cell, and how to look at the outputs of the EKF when doing so, and understand what kind of information is important from that. Next week, you will learn about the SPKF, all the same basic steps of the derivation and the implementation and execution and evaluation. I think, particle filters are really interesting, and I teach a course at the university that teaches some concepts in that. But I really don't believe that they're good candidates for the battery state of charge estimation problem in a real-time battery management system simply because of their computational complexity. Perhaps, in the future, there will exist microprocessors that can implement particle filters for realistic prices. But for the time being, the EKF and the SPKF I believe are far better approaches. The EKF and SPKF are both developed based on the Gaussian sequential probabilistic inference solution that you've already learned about. So, in preparation to study these two nonlinear methods, I will review this Gaussian sequential probabilistic inference solution. Remember that the solution divides naturally into two steps, and each of these two steps has three sub-steps. The first major step is a prediction step. The second major step is a correction step. For the prediction step, the first sub-step is to predict the state value at the present point in time. The second sub-step is to compute the error covariance matrix of that state vector prediction. The third step is to predict the measurement that we will make. The EKF and SPKF will have different mathematical expressions for evaluating these steps from the linear Kalman filter. This is because these two nonlinear methods start with different models, the non-linear models, and they use different assumptions for evaluating the expectations involved. But the same basic approach is used, the same basic idea. For the correction step, the first sub-step is to compute the estimator gain matrix. The second sub-step is to compute the state estimate based on the state prediction and the innovation and the gain matrix. The final step is to compute the covariance matrix of the state estimation error. Once again, the EKF and SPKF simply have different expressions from the linear Kalman filter for evaluating these different sub-steps. The same basic framework is used but the equations turn out to be different. So, with this introduction, you are ready to jump right into the material of this week. You've learned all about Gaussian sequential probabilistic inference before, and you will learn how it can be applied to a linear system to derive the linear Kalman filter. But you recognize that battery cells are non-linear systems and so we need a non-linear model to describe them, and non-linear Kalman filters to estimate the state of this model. In this course, you will learn about two different approaches to generalizing the Kalman filter idea to non-linear systems. One of these approaches leads to an algorithm known as the extended Kalman filter or EKF. The second approach leads to an algorithm known as the sigma point Kalman filter or SPKF, and one variation of the SPKF is the unscented Kalman filter or the UKF. Both the extended Kalman filter and the sigma point Kalman filter in some variations obey this predict correct sequence of six sub-steps from Gaussian sequential probabilistic inference that you've already learned about. So, the derivations that you will see over the next two weeks will involve evaluating these six sub-steps under different sets of assumptions. So, with that introduction, you are now ready and let's proceed and begin discussing the EKF.