In the last lesson, we reviewed the basic HPPC method for computing estimates of power limits. The basic HPPC method computes power limits based only on limits on future terminal voltage, and we can quite easily extend this method to include state of charge base limits with the same moving time horizon of delta T seconds. So, let's consider the case of constant current over that time horizon. We use our state of charge equation from our battery model to write that the future state of charge is equal to the present state of charge, minus the coulombic efficiency factor, multiplied by the time horizon length, multiplied by the input current, all divided by the total capacity of the cell. As always, we assume that the coulombic efficiency is equal to one for discharge currents, but it is less than or equal to one for charging currents. If we have design limits such that the future state of charge must always remain between a minimum value of Z min and a maximum value of Z max, for every cell in the pack, then we compute current by reversing this equation to enforce those limits. Some simple algebra which I omit from this slide gives current limits based on the present state of charge for every cell. So, the discharge current is equal to the present state of charge, minus Z min, all divided by the time horizon duration over Q. The charge current is computed as the present state of charge minus Z max, all divided by the efficiency, multiplied by the time horizon over the capacity Q. We can slightly improve the quality of the estimates that we get from this method if we think about how we are receiving state of charge from our battery management system. We're almost certainly going to be receiving estimates of state of charge from some state of charge estimator, and if we're estimating state of charge using some kind of a Kalman filter, remember that the filter is always going to give us confidence bounds, or error bounds, or uncertainty bounds on its estimate of state of charge. We can use this additional information to make our power estimates more reliable or more conservative. So, let's assume that we desire to use a 3-sigma confidence interval from the SOC estimator as part of our power limits computation. Then, when we are discharging, instead of using the estimated state of charge directly as the starting point in the equations on the previous slide, we use the estimated state of charge minus three times sigma as a worst-case estimate of what our present state of charge might be when we're computing discharge power. Or if we're charging, then we use the present state of charge plus three sigma in our calculations as a worst-case scenario. This way, we are much more confident that our state of charge limits will never be violated even though we know that there is some error or some uncertainty in the state of charge estimates that we're receiving regarding the present state of the battery pack right now. Once we have calculated cell current limits based on state of charge, we can compute discharge currents combined with all of the limits enforced at the same time. So, remember from the previous lesson, you learned how to compute all of the maximum discharge currents based on a terminal voltage constraint. Then, from this lesson and the previous slide, you learned how to compute a discharge current based on a future state of charge constraint. So, we must never discharge at a level of current that's higher than either one of these computations because if we do so, then one of the design limits will be broken or the other or even both. So, we must use these as maximum values and take the minimum of these currents to find the one that will not violate either of the design criteria. So, when we do this, we find an overall I max in our computation. So, our I max is the minimum of the design I max, which is the electronics design future limits, but also the minimum of all the state of charge-based maximum discharge currents and the minimum of all the voltage based future maximum currents. So, we take the currents and then we multiply them by Np, which is the number of cells in parallel, which would give us the maximum string current or battery pack current. So, in this expression for finding the value of current that's closest to zero among all of the limiting currents based on electronics and future states of charge, and future voltage. We do something very, very similar when we look at computing the charge current, but remember the charge current is always negative. So, when we want to find the value that's closest to zero, we use a maximum value and assigned sense instead of a minimum value so that we don't violate any of the limits. So, we first look at all of the individual currents computed to enforce the future terminal voltage constraints and currents computer to enforce the future state of charge constraints, and we take the maximum value of all of these which is the signed value closest to zero, and we compare that with the level of charged current that is permitted by the electronics, and we take the maximum of all those which again is the value closest to zero. Then, we take the limiting cell current and we multiply by Np to get a pack level current value. Once we've computed the pack current, we can compute the charge and discharge power. We do this by summing the amount of current that we've computed, multiplying the future voltage of every cell in the battery pack. Each future voltage might be different because of the different initial states of charge and so forth by using the very simple cell model that we're assuming this week that is only the open-circuit voltage and the cell resistance we can compute this future voltage quite easily. The equations on this slide also compute power by adding a limiting factor that's based on a maximum load power design limit, and we also multiply by the number of cells in series to get the overall battery pack power level. So, this concludes our discussion of the enhanced HPPC method that includes voltage limits and SOC limits, and power limits, based on the load and current limits based on the electronics. The previous method used voltage based limits only. In this lesson, we added these power limits based on the future state of charge and electronics, and current and load, and you also learned how to use the confidence intervals or the error bounds produced by different types of Kalman filters to give conservative estimates on available power. So, this completes our discussion of the simple HPPC method. Next, you're going to learn how to implement all of this in octave code.