  We consider a two-level profit-maximizing strategy, including planning and
control, for battery energy storage system (BESS) owners that participate in
the primary frequency control (PFC) market. Specifically, the optimal BESS
control minimizes the operating cost by keeping the state of charge (SoC) in an
optimal range. Through rigorous analysis, we prove that the optimal BESS
control is a "state-invariant" strategy in the sense that the optimal SoC range
does not vary with the state of the system. As such, the optimal control
strategy can be computed offline once and for all with very low complexity.
Regarding the BESS planning, we prove that the the minimum operating cost is a
decreasing convex function of the BESS energy capacity. This leads to the
optimal BESS sizing that strikes a balance between the capital investment and
operating cost. Our work here provides a useful theoretical framework for
understanding the planning and control strategies that maximize the economic
benefits of BESSs in ancillary service markets.
