OC_SIM Project

What is OC_SIM?

OC_SIM was developed for public use, which solves optimal control problems for Hybrid Electric Vehicles (HEVs) or Plug-in Hybrid Electric Vehicles (PHEVs), where it optimizes the energy management in order to maximize the fuel efficiencies of the vehicles.  The tool is solving the problems by using two representative optimal control concepts, Dynamic Programming (DP) and Pontryagin's Minimum Principle (PMP), and also by using backward looking controls based on quasi-static models. The backward facing models allows users to select efficiency maps and parameters for vehicle components, such as engines, motors, batteries, and transmissions. Actually, the tool was developed by Namwook Kim in 2008, when he, as a graduate student, was joining Prof. Huei Peng's group at University of Michigan. For the one-year visiting, he had a lot of time, so he played soccer and tennis, traveled a lot, and cooked for his lunch boxes. After doing these things, he still had some time, and he worked for developing OC_SIM. The tool has been used and upgraded by Renewable Energy Conversions Lab. directed by Prof. Suk Won Cha at Seoul National University. It is not that the tool is as great as a software developed by Microsoft or Google is. No fun, no fan, never... However, the tool is supposed to be renovated by Machine Dynamics Lab. lead by Prof. Namwook Kim, and the team is currently working on the rebooting project for OC_SIM. A newer version will be available in mid 2020, hopefully. 

Applied Optimal Control Theories

In order to solve deterministic optimal control problems, there are two well-known approaches. One is the Hamilton-Jacobi-Bellman (HJB) approach, which is based on Dynamic Programming from Bellman’s principle of optimality, and the other is trajectory optimization based on Pontryagin's Minimum Principle, which originates from the Calculus of Variation. The following briefs are about the fundamentals about the two approaches.

DP directly solves the optimal control problem by examining all admissible control inputs that generates all available state trajectories. The control concept is based Bellman’s principle of optimality, and the solution can be obtained by Hamilton–Jacobi–Bellman equation.




Fig. 1. A field of the optimal cost. The field is a family of optimal fuel consumptions. The starting point is SOC =0.6 and t=0. Contrary to this figure, in general, a field of cost-to-go is widely used in optimal control problems because it is more useful for dealing with state equations.

DP produces a field of optimal control based on the principle of optimality; the field, which is defined as an optimal filed, is a family of optimal fuel consumptions, as shown in Fig. 1. The optimal field practically has a same meaning with “cost-to-go” though we really obtained “cost-from-start” in a same framework. The reason we prefer to use this forward accumulating technique is that we can calculate optimal fuel consumption and obtain optimal control even for different final SOC, which can be considered as the best performance at a given final SOC when evaluating a strategy in a forward looking control simulation.

Pontryagin’s minimum principle (PMP), which is a general case of the Euler-Lagrange equation in the Calculus of Variation, considers the optimality of a single trajectory. In general, the DP approach guarantees the global optimal solution by obtaining all possible optimal trajectories from the field of optimal control. On the other hand, PMP, as one method of trajectory optimization, yields us necessary – but not sufficient – conditions that the absolute (i.e., global optimal) trajectory must satisfy. In optimal control problem for HEVs, PMP-based control looks for control inputs that minimize Hamiltonian which is defined as:

H = m_fc + costate x SOC_dot





Fig. 2. SOC trajectories solved by PMP.  If the costate is not appropriately initialized, it will fail to achieve the desired final SOC.





Fig. 3. Co-state trajectories solved by PMP. In the control problem for HEV, the costate is near constant for the entire driving, because SOC is not changed a lot for HEV. 

The solutions are obtained by solving differential equations. The boundary value problem can be converted to an initial value problem, and following techniques could be used for obtaining the solution. 



Fig. 4. The concept of the shooting method. The initial costate can be re-selected to improve the results, or to have the final SOC that are close to the desired final SOC. Newton-Raphson method can be used to update the initial costate.

The trajectory derived from PMP might not be a global optimal solution. Therefore, the control solution obtained by PMP can be considered an inferior solution compared to the (globally optimal) control solution obtained by DP. On the other hand, DP requires more computing power and calculation time than PMP because DP solves all possible optimal controls to fill the optimal field. Since DP is a numerical representation of the HJB equation, which solves a partial differential equation (PDE), whereas PMP solves just nonlinear second-order differential equations. The drawback of DP with regard to the computational load was called as ‘curse of dimensionality,’ which can be especially worse than we expected when we have to handle multiple state variables. Simply, the computational load of DP exponentially increases in accordance with the increase of the dimension of the problem. However, in PMP, the number of nonlinear second-order differential equations linearly increases with the dimension. In conclusion, we can say that the control based on PMP can reduce the computational time for getting an optimal trajectory but it might be a local optimal solution, not a global solution in general problems. However, many studies show that PMP-based controls are very close to the optimal solutions for the control problems of HEVs. Please, see the references below, which could be good starting points for understanding OC_SIM.

Download OC_SIM

OC Sim 20191108 (One Drive)

OC_SIM ver 2.0 (One Drive)