This paper presents a power-based dynamic programming (DP) method for day-ahead battery scheduling in a grid-connected photovoltaic (PV) microgrid under time-of-use (TOU) tariffs. The proposed formulation optimizes battery power directly, rather than SOC setpoints, so the dispatch is easier to apply in practical inverter control and remains computationally tractable over a 48 h horizon. The model includes battery degradation through a linear wear-cost term based on a 200 USD/kWh replacement cost, while also enforcing SOC and charging/discharging power limits. The case study uses a 250 kWh battery and evaluates two power limits, 0.1C and 0.2C, together with two degradation cases, 200 and 400 USD/kWh. The simulation considers two different operating days to test the controller under unequal renewable and demand conditions. Day 1 has stronger PV generation and lower load demand, whereas Day 2 has lower PV output and higher demand. Under the baseline 0.1C limit, DP reduces the net operating cost to 97.47 USD, compared with 122.95 USD for the TOU-aware rule-based benchmark. When the power limit increases to 0.2C, the net operating cost falls further to 78.35 USD because export revenue rises substantially. When the battery replacement cost doubles from 200 USD/kWh to 400 USD/kWh, the optimizer reduces cycling and the net operating cost increases to 129.21 USD. Overall, the results show that power-based DP provides a practical and transparent framework for balancing tariff arbitrage and battery preservation in grid-connected microgrids.
