  Two key challenges in optimal control include efficiently solving
high-dimensional problems and handling optimal control problems with
state-dependent running costs. In this paper, we consider a class of optimal
control problems whose running costs consist of a quadratic on the control
variable and a convex, non-negative, piecewise affine function on the state
variable. We provide the analytical solution for this class of optimal control
problems as well as a Hopf-type representation formula for the corresponding
Hamilton-Jacobi partial differential equations. Finally, we propose efficient
numerical algorithms based on our Hopf-type representation formula, convex
optimization algorithms, and min-plus techniques. We present several
high-dimensional numerical examples, which demonstrate that our algorithms
overcome the curse of dimensionality. We also describe a field-programmable
gate array (FPGA) implementation of our numerical solver whose latency scales
linearly in the spatial dimension and that achieves approximately a 40 times
speedup compared to a parallelized central processing unit (CPU)
implementation. Thus, our numerical results demonstrate the promising
performance boosts that FPGAs are able to achieve over CPUs. As such, our
proposed methods have the potential to serve as a building block for solving
more complicated high-dimensional optimal control problems in real-time.
