1. A controller of an electrical system that includes a battery, the controller comprising: a communication interface to receive a measurement of a current state of a battery of the electrical system; and one or more processors to: determine a throughput component of degradation of the battery for a time period; determine an aging component of degradation of the battery for the time period; sum the throughput component and the aging component to determine a total battery degradation for the time period; determine a battery degradation cost based on the total battery degradation for the time period; determine a set of control values for a set of control variables to effectuate a change to the electrical system toward meeting a controller objective for economical optimization of the electrical system during an upcoming time domain, wherein the set of control values are determined by the one or more processors in accordance with one or more cost elements associated with operation of the electrical system, including the battery degradation cost; and control the electrical system via the communication interface based on the determined values for the set of control variables.